diff options
author | Danesh Petigara <dpetigara@broadcom.com> | 2016-01-07 16:03:33 -0800 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2016-01-08 11:50:14 -0500 |
commit | e39b2bb3b72b999a04e8d295882be3255aca5ade (patch) | |
tree | 03734de006c786e574b97ab5ed6178078ae884c0 /drivers/ata/libata-core.c | |
parent | 6ca92dd7aff899777a3081c5948409f4bdef7d38 (diff) | |
download | linux-e39b2bb3b72b999a04e8d295882be3255aca5ade.tar.gz linux-e39b2bb3b72b999a04e8d295882be3255aca5ade.tar.bz2 linux-e39b2bb3b72b999a04e8d295882be3255aca5ade.zip |
libata: skip debounce delay on link resume
The link resume logic uses a 200msec delay while debouncing
the SControl register. The rationale behind that delay is
to accommodate some PHYs that behave badly if their SStatus/
SControl registers are pounded immediately on resume.
The Broadcom STB SATA PHY does not seem to have this issue.
This patch introduces a new link flag that allows platforms
to skip the debounce delay if it isn't needed.
Signed-off-by: Danesh Petigara <dpetigara@broadcom.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata/libata-core.c')
-rw-r--r-- | drivers/ata/libata-core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index f5ae6f43b659..cbb74719d2c1 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -3598,7 +3598,8 @@ int sata_link_resume(struct ata_link *link, const unsigned long *params, * immediately after resuming. Delay 200ms before * debouncing. */ - ata_msleep(link->ap, 200); + if (!(link->flags & ATA_LFLAG_NO_DB_DELAY)) + ata_msleep(link->ap, 200); /* is SControl restored correctly? */ if ((rc = sata_scr_read(link, SCR_CONTROL, &scontrol))) |