diff options
author | Haojian Zhuang <haojian.zhuang@linaro.org> | 2014-04-03 21:28:10 +0800 |
---|---|---|
committer | Andrey Konovalov <andrey.konovalov@linaro.org> | 2014-04-16 23:52:33 +0400 |
commit | 971342d7a90de74dc9ee60698d8002ed1dfdfaf4 (patch) | |
tree | cc17c7a12b562f4f7ece49cca43bc0e8d3f909c2 /drivers/ata | |
parent | 4fe75b321b14575bd2c2e622c8e17be205f24226 (diff) |
ata: ahci: append new hflag
Append AHCI_HFLAG_NO_FBS to force turning off FBS flag.
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/ahci.h | 1 | ||||
-rw-r--r-- | 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 2289efdf820..167e519a242 100644 --- a/drivers/ata/ahci.h +++ b/drivers/ata/ahci.h @@ -232,6 +232,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 36605abe5a6..ec3332f1a8e 100644 --- a/drivers/ata/libahci.c +++ b/drivers/ata/libahci.c @@ -450,6 +450,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; |