diff options
author | Gabriele Mazzotta <gabriele.mzt@gmail.com> | 2015-04-25 20:52:37 +0300 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2015-06-03 12:33:12 +0300 |
commit | 59f43abf797e35cd4d6d4ea9768250449d505b40 (patch) | |
tree | b654f084d75a27f67b22335bc56e982f7427fba7 /drivers/ata/libata-eh.c | |
parent | 4037866e8eb01c45631a093524c37e6b913bab97 (diff) | |
download | linux-59f43abf797e35cd4d6d4ea9768250449d505b40.tar.xz |
libata: Ignore spurious PHY event on LPM policy change
commit 09c5b4803a80a5451d950d6a539d2eb311dc0fb1 upstream.
When the LPM policy is set to ATA_LPM_MAX_POWER, the device might
generate a spurious PHY event that cuases errors on the link.
Ignore this event if it occured within 10s after the policy change.
The timeout was chosen observing that on a Dell XPS13 9333 these
spurious events can occur up to roughly 6s after the policy change.
Link: http://lkml.kernel.org/g/3352987.ugV1Ipy7Z5@xps13
Signed-off-by: Gabriele Mazzotta <gabriele.mzt@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'drivers/ata/libata-eh.c')
-rw-r--r-- | drivers/ata/libata-eh.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 370462fa8e01..063036d876b0 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c @@ -3481,6 +3481,9 @@ static int ata_eh_set_lpm(struct ata_link *link, enum ata_lpm_policy policy, } } + link->last_lpm_change = jiffies; + link->flags |= ATA_LFLAG_CHANGED; + return 0; fail: |