diff options
author | Tejun Heo <tj@kernel.org> | 2010-07-24 10:53:48 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2010-08-25 19:24:16 -0400 |
commit | 5f173107ecad83a50fc297f5a99bcda961501fc9 (patch) | |
tree | 02b2ef16c50af54dcffd009233a8cd9767115e2e /drivers/ata/libahci.c | |
parent | 6d981b9a91be29c0deae5ac794a4fe885027032f (diff) |
ahci: add HFLAG_YES_FBS and apply it to 88SE9128
88SE9128 can do FBS and sets it in HOST_CAP but forgets to set FBSCP
in PORT_CMD. Implement AHCI_HFLAG_YES_FBS and apply it to 88SE9128.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/libahci.c')
-rw-r--r-- | drivers/ata/libahci.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c index 81e772a94d59..666850d31df2 100644 --- a/drivers/ata/libahci.c +++ b/drivers/ata/libahci.c | |||
@@ -430,6 +430,12 @@ void ahci_save_initial_config(struct device *dev, | |||
430 | cap &= ~HOST_CAP_SNTF; | 430 | cap &= ~HOST_CAP_SNTF; |
431 | } | 431 | } |
432 | 432 | ||
433 | if (!(cap & HOST_CAP_FBS) && (hpriv->flags & AHCI_HFLAG_YES_FBS)) { | ||
434 | dev_printk(KERN_INFO, dev, | ||
435 | "controller can do FBS, turning on CAP_FBS\n"); | ||
436 | cap |= HOST_CAP_FBS; | ||
437 | } | ||
438 | |||
433 | if (force_port_map && port_map != force_port_map) { | 439 | if (force_port_map && port_map != force_port_map) { |
434 | dev_printk(KERN_INFO, dev, "forcing port_map 0x%x -> 0x%x\n", | 440 | dev_printk(KERN_INFO, dev, "forcing port_map 0x%x -> 0x%x\n", |
435 | port_map, force_port_map); | 441 | port_map, force_port_map); |
@@ -2036,9 +2042,15 @@ static int ahci_port_start(struct ata_port *ap) | |||
2036 | u32 cmd = readl(port_mmio + PORT_CMD); | 2042 | u32 cmd = readl(port_mmio + PORT_CMD); |
2037 | if (cmd & PORT_CMD_FBSCP) | 2043 | if (cmd & PORT_CMD_FBSCP) |
2038 | pp->fbs_supported = true; | 2044 | pp->fbs_supported = true; |
2039 | else | 2045 | else if (hpriv->flags & AHCI_HFLAG_YES_FBS) { |
2046 | dev_printk(KERN_INFO, dev, | ||
2047 | "port %d can do FBS, forcing FBSCP\n", | ||
2048 | ap->port_no); | ||
2049 | pp->fbs_supported = true; | ||
2050 | } else | ||
2040 | dev_printk(KERN_WARNING, dev, | 2051 | dev_printk(KERN_WARNING, dev, |
2041 | "The port is not capable of FBS\n"); | 2052 | "port %d is not capable of FBS\n", |
2053 | ap->port_no); | ||
2042 | } | 2054 | } |
2043 | 2055 | ||
2044 | if (pp->fbs_supported) { | 2056 | if (pp->fbs_supported) { |