From: Kefeng Wang Date: Wed, 14 May 2014 06:13:40 +0000 (+0800) Subject: ata: ahci: append new hflag AHCI_HFLAG_NO_FBS X-Git-Tag: firefly_0821_release~176^2~3811^2~6 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=888d91a08fa8e2be4cb0eef1e5736ef68b8f77f0;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: Haojian Zhuang Signed-off-by: Kefeng Wang Signed-off-by: Tejun Heo --- diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h index 51af275b3388..60db49b95001 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 6bd4f660b4e1..e1cf859876fe 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);