Commit ad74e4c1 authored by Tejun Heo's avatar Tejun Heo Committed by Jeff Garzik

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: default avatarTejun Heo <tj@kernel.org>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent 1eca4365
...@@ -6123,7 +6123,7 @@ static void ata_port_detach(struct ata_port *ap) ...@@ -6123,7 +6123,7 @@ static void ata_port_detach(struct ata_port *ap)
/* EH is now guaranteed to see UNLOADING - EH context belongs /* EH is now guaranteed to see UNLOADING - EH context belongs
* to us. Restore SControl and disable all existing devices. * 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); sata_scr_write(link, SCR_CONTROL, link->saved_scontrol & 0xff0);
ata_for_each_dev(dev, link, ALL) ata_for_each_dev(dev, link, ALL)
ata_dev_disable(dev); ata_dev_disable(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment