From patchwork Mon Apr 21 04:01:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 28664 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f69.google.com (mail-oa0-f69.google.com [209.85.219.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 175AF203AB for ; Mon, 21 Apr 2014 04:03:17 +0000 (UTC) Received: by mail-oa0-f69.google.com with SMTP id i4sf15383442oah.0 for ; Sun, 20 Apr 2014 21:03:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=mspn84ILjFzkVHP/2FofxsE95h6bP6PwVp4Skf2benI=; b=ACx1uqSKzi1pJprCd5Q0Wv/jRpOtifM5KDfauGa1LzyUla6bUvnuRV6nJG0kJp3XGV pBlnIc3Cwg+B6piesjQzDJ3j0DEQg4Py3NEsIzKcl6AL/HaKmpxXyQgoFSeo/rPCXMeV rXzwYOHqSN7i1Xs5WCiGg2ArSKbvSSNlKZUdLrigk6PQiIE9i2Wi7eO6W0UdQVjDieP0 aoIKS+XaqWUVzsMsh88l2EenZWTxRlSz8+ORgpBfiPYqIYVJeRx9MrCJ90lW+Tyovg3r w0J3jroETcSku0Ditbm/LFIXik6WZxbL7OL29c5fC1laAOr++cZb8Jd4p/ujDj0cTR+j 5l4Q== X-Gm-Message-State: ALoCoQkkoweJw8sbClW80XNSDiUM9ePfJm1tdOx3X0Y/80B4rA01GH1rY1SeWJcEaoco2n92IVi6 X-Received: by 10.182.219.226 with SMTP id pr2mr17767619obc.44.1398052996503; Sun, 20 Apr 2014 21:03:16 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.22.75 with SMTP id 69ls2282620qgm.94.gmail; Sun, 20 Apr 2014 21:03:16 -0700 (PDT) X-Received: by 10.220.106.84 with SMTP id w20mr28131504vco.18.1398052996398; Sun, 20 Apr 2014 21:03:16 -0700 (PDT) Received: from mail-ve0-f182.google.com (mail-ve0-f182.google.com [209.85.128.182]) by mx.google.com with ESMTPS id c6si5600091veo.162.2014.04.20.21.03.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 20 Apr 2014 21:03:16 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.182 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.182; Received: by mail-ve0-f182.google.com with SMTP id jw12so7247777veb.27 for ; Sun, 20 Apr 2014 21:03:16 -0700 (PDT) X-Received: by 10.52.142.10 with SMTP id rs10mr24449811vdb.3.1398052996331; Sun, 20 Apr 2014 21:03:16 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp265187vcb; Sun, 20 Apr 2014 21:03:15 -0700 (PDT) X-Received: by 10.66.122.101 with SMTP id lr5mr839477pab.130.1398052994321; Sun, 20 Apr 2014 21:03:14 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qf4si20087357pbb.180.2014.04.20.21.03.13; Sun, 20 Apr 2014 21:03:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751401AbaDUECr (ORCPT + 26 others); Mon, 21 Apr 2014 00:02:47 -0400 Received: from mail-pa0-f54.google.com ([209.85.220.54]:53073 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751138AbaDUEB6 (ORCPT ); Mon, 21 Apr 2014 00:01:58 -0400 Received: by mail-pa0-f54.google.com with SMTP id lf10so3314616pab.13 for ; Sun, 20 Apr 2014 21:01:58 -0700 (PDT) X-Received: by 10.67.8.102 with SMTP id dj6mr35925883pad.10.1398052918193; Sun, 20 Apr 2014 21:01:58 -0700 (PDT) Received: from localhost.localdomain ([218.17.215.175]) by mx.google.com with ESMTPSA id yo9sm179742023pab.16.2014.04.20.21.01.53 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 20 Apr 2014 21:01:57 -0700 (PDT) From: Kefeng Wang To: Tejun Heo Cc: Hans de Goede , linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, wangkefeng.wang@huawei.com, Haojian Zhuang Subject: [PATCH v3 1/2] ata: ahci: append new hflag AHCI_HFLAG_NO_FBS Date: Mon, 21 Apr 2014 12:01:41 +0800 Message-Id: <1398052903-10322-2-git-send-email-kefeng.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1398052903-10322-1-git-send-email-kefeng.wang@linaro.org> References: <1398052903-10322-1-git-send-email-kefeng.wang@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: kefeng.wang@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.182 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Append AHCI_HFLAG_NO_FBS to force turning off FBS flag. Signed-off-by: Haojian Zhuang Signed-off-by: Kefeng Wang --- drivers/ata/ahci.h | 1 + drivers/ata/libahci.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h index 51af275..60db49b 100644 --- a/drivers/ata/ahci.h +++ b/drivers/ata/ahci.h @@ -235,6 +235,7 @@ enum { port start (wait until error-handling stage) */ AHCI_HFLAG_MULTI_MSI = (1 << 16), /* multiple PCI MSIs */ + AHCI_HFLAG_NO_FBS = (1 << 17), /* no FBS */ /* ap->flags bits */ diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c index 6bd4f66..e1cf859 100644 --- a/drivers/ata/libahci.c +++ b/drivers/ata/libahci.c @@ -457,6 +457,11 @@ void ahci_save_initial_config(struct device *dev, cap |= HOST_CAP_FBS; } + if ((cap & HOST_CAP_FBS) && (hpriv->flags & AHCI_HFLAG_NO_FBS)) { + dev_info(dev, "controller can't do FBS, turning off CAP_FBS\n"); + cap &= ~HOST_CAP_FBS; + } + if (force_port_map && port_map != force_port_map) { dev_info(dev, "forcing port_map 0x%x -> 0x%x\n", port_map, force_port_map);