summaryrefslogtreecommitdiff
path: root/drivers/ata
diff options
context:
space:
mode:
authorKefeng Wang <kefeng.wang@linaro.org>2014-05-14 14:13:40 +0800
committerNitin Garg <nitin.garg@freescale.com>2015-04-14 13:59:53 -0500
commitd331be4e4a8983a0974e2bb1ee54c091ee8d0e8c (patch)
tree0bb688790abb5e207bfaf2b175f2ef10f219910f /drivers/ata
parent9b2ae98fd390a7973399c373f51ef7b2a1666ac3 (diff)
ata: ahci: append new hflag AHCI_HFLAG_NO_FBS
Append AHCI_HFLAG_NO_FBS to force turning off FBS flag. Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org> Signed-off-by: Kefeng Wang <kefeng.wang@linaro.org> Signed-off-by: Tejun Heo <tj@kernel.org> (cherry picked from commit 888d91a08fa8e2be4cb0eef1e5736ef68b8f77f0)
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/ahci.h1
-rw-r--r--drivers/ata/libahci.c5
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h
index b5eb886da226..48073efd45f9 100644
--- a/drivers/ata/ahci.h
+++ b/drivers/ata/ahci.h
@@ -236,6 +236,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 a4a04d9323b0..c0d49d0cc8cd 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);