From ad74e4c18d0962397314460d0da312e72c8bd02d Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Mon, 3 Nov 2008 20:03:49 +0900 Subject: 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 Signed-off-by: Jeff Garzik --- drivers/ata/libata-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/ata') diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index ffd98e4e65b..1ecc3cb0b72 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) /* EH is now guaranteed to see UNLOADING - EH context belongs * to us. Restore SControl and disable all existing devices. */ - ata_for_each_link(link, ap, HOST_FIRST) { + ata_for_each_link(link, ap, PMP_FIRST) { sata_scr_write(link, SCR_CONTROL, link->saved_scontrol & 0xff0); ata_for_each_dev(dev, link, ALL) ata_dev_disable(dev); -- cgit v1.2.3