[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1397107468-640-2-git-send-email-wangkefeng.wang@huawei.com>
Date: Thu, 10 Apr 2014 13:24:27 +0800
From: Kefeng Wang <wangkefeng.wang@...wei.com>
To: Tejun Heo <tj@...nel.org>
CC: Hans de Goede <hdegoede@...hat.com>, <linux-ide@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <guohanjun@...wei.com>,
Kefeng Wang <kefeng.wang@...aro.org>,
Haojian Zhuang <haojian.zhuang@...aro.org>
Subject: [PATCH V2 1/2] ata: ahci: append new hflag AHCI_HFLAG_NO_FBS
From: Kefeng Wang <kefeng.wang@...aro.org>
Append AHCI_HFLAG_NO_FBS to force turning off FBS flag.
Signed-off-by: Haojian Zhuang <haojian.zhuang@...aro.org>
Signed-off-by: Kefeng Wang <kefeng.wang@...aro.org>
---
drivers/ata/ahci.h | 1 +
drivers/ata/libahci.c | 5 +++++
2 files changed, 6 insertions(+), 0 deletions(-)
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..573edb3 100644
--- a/drivers/ata/libahci.c
+++ b/drivers/ata/libahci.c
@@ -452,6 +452,11 @@ void ahci_save_initial_config(struct device *dev,
cap &= ~HOST_CAP_SNTF;
}
+ 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 (!(cap & HOST_CAP_FBS) && (hpriv->flags & AHCI_HFLAG_YES_FBS)) {
dev_info(dev, "controller can do FBS, turning on CAP_FBS\n");
cap |= HOST_CAP_FBS;
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists