aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2008-11-03 06:03:49 -0500
committerJeff Garzik <jgarzik@redhat.com>2008-12-28 22:43:21 -0500
commitad74e4c18d0962397314460d0da312e72c8bd02d (patch)
treea2839731f70b44cca5e74b614dfb4de5a0d22c61 /drivers/ata
parent1eca4365be25c540650693e941bc06a66cf38f94 (diff)
libata: when restoring SControl during detach do the PMP links first
When restoring SControl during detach, PMP links should be handled first as changing SControl of the host link can affect SCR access of PMP links. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/libata-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index ffd98e4e65b4..1ecc3cb0b722 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -6123,7 +6123,7 @@ static void ata_port_detach(struct ata_port *ap)
6123 /* EH is now guaranteed to see UNLOADING - EH context belongs 6123 /* EH is now guaranteed to see UNLOADING - EH context belongs
6124 * to us. Restore SControl and disable all existing devices. 6124 * to us. Restore SControl and disable all existing devices.
6125 */ 6125 */
6126 ata_for_each_link(link, ap, HOST_FIRST) { 6126 ata_for_each_link(link, ap, PMP_FIRST) {
6127 sata_scr_write(link, SCR_CONTROL, link->saved_scontrol & 0xff0); 6127 sata_scr_write(link, SCR_CONTROL, link->saved_scontrol & 0xff0);
6128 ata_for_each_dev(dev, link, ALL) 6128 ata_for_each_dev(dev, link, ALL)
6129 ata_dev_disable(dev); 6129 ata_dev_disable(dev);