diff options
author | Danesh Petigara <dpetigara@broadcom.com> | 2016-01-11 13:22:26 -0800 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2016-01-25 15:20:44 -0500 |
commit | fb3296335500aaff61333df8eabbccf28761c79d (patch) | |
tree | 0dae24ccd8a24d7b20c95503e9793eae3d7d7e4d /drivers/ata/ahci_brcmstb.c | |
parent | 92e963f50fc74041b5e9e744c330dca48e04f08d (diff) | |
download | blackbird-op-linux-fb3296335500aaff61333df8eabbccf28761c79d.tar.gz blackbird-op-linux-fb3296335500aaff61333df8eabbccf28761c79d.zip |
drivers: ata: wake port before DMA stop for ALPM
The AHCI driver code stops and starts port DMA engines at will
without considering the power state of the particular port. The
AHCI specification isn't very clear on how to handle this scenario,
leaving implementation open to interpretation.
Broadcom's STB SATA host controller is unable to handle port DMA
controller restarts when the port in question is in low power mode.
When a port enters partial or slumber mode, its PHY is powered down.
When a controller restart is requested, the controller's internal
state machine expects the PHY to be brought back up by software which
never happens in this case, resulting in failures.
To avoid this situation, logic is added to manually wake up the port
just before its DMA engine is stopped, if the port happens to be in
a low power state. HBA initiated power management ensures that the port
eventually returns to its configured low power state, when the link is
idle (as per the conditions listed in the spec). A new host flag is also
added to ensure this logic is only exercised for hosts with the above
limitation.
tj: Formatting changes.
Signed-off-by: Danesh Petigara <dpetigara@broadcom.com>
Reviewed-by: Markus Mayer <mmayer@broadcom.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata/ahci_brcmstb.c')
-rw-r--r-- | drivers/ata/ahci_brcmstb.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/ata/ahci_brcmstb.c b/drivers/ata/ahci_brcmstb.c index b36cae2fd04b..e87bcec0fd7c 100644 --- a/drivers/ata/ahci_brcmstb.c +++ b/drivers/ata/ahci_brcmstb.c @@ -317,6 +317,7 @@ static int brcm_ahci_probe(struct platform_device *pdev) if (IS_ERR(hpriv)) return PTR_ERR(hpriv); hpriv->plat_data = priv; + hpriv->flags = AHCI_HFLAG_WAKE_BEFORE_STOP; brcm_sata_alpm_init(hpriv); |