summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)
/* 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);