Tejun Heo e5005b15c9 libata: issue DIPM enable commands with LPM state updated
Low level drivers may behave differently depending on the current
link->lpm_policy.  During ata_eh_set_lpm(), DIPM enable commands are
issued after the successful completion of ap->ops->set_lpm(), which
means that the controller is already in the target state.  This causes
DIPM enable commands to be processed with mismatching controller power
state and link->lpm_policy value.

In ahci, link->lpm_policy is used to ignore certain PHY events if LPM
is enabled; however, as DIPM commands are issued with stale
link->lpm_policy, they sometimes end up triggering these conditions
and get aborted leading to LPM configuration failure.

Fix it by updating link->lpm_policy before issuing DIPM enable
commands.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Kyle McMartin <kyle@mcmartin.ca>
Cc: stable@kernel.org
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2010-12-24 13:34:34 -05:00
..
2010-10-21 20:21:05 -04:00
2010-10-21 20:21:05 -04:00
2010-12-24 13:33:37 -05:00
2010-12-24 13:33:37 -05:00
2010-05-25 19:40:30 -04:00
2010-05-25 19:40:30 -04:00
2010-05-25 19:40:30 -04:00
2010-05-25 19:40:30 -04:00
2010-05-25 19:40:30 -04:00
2008-01-23 05:24:15 -05:00
2010-05-25 19:40:30 -04:00
2010-05-19 13:36:46 -04:00
2007-07-02 10:17:42 -04:00