diff options
author | Tejun Heo <tj@kernel.org> | 2008-11-03 13:27:07 +0300 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-11-04 09:08:33 +0300 |
commit | 299246f9a2a4c5c531863d72bad7ebd0de213de9 (patch) | |
tree | c153c51f2857e053cc40bada5a520d94fea4a354 | |
parent | 6a87e42e955ff27e07a77f65f8f077dc7c4171e1 (diff) | |
download | linux-299246f9a2a4c5c531863d72bad7ebd0de213de9.tar.xz |
libata: mask off DET when restoring SControl for detach
libata restores SControl on detach; however, trying to restore
non-zero DET can cause undeterministic behavior including PMP device
going offline till power cycling. Mask off DET when restoring
SControl.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
-rw-r--r-- | drivers/ata/libata-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 91b478f20557..622350d9b2e3 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -5936,7 +5936,7 @@ static void ata_port_detach(struct ata_port *ap) * to us. Restore SControl and disable all existing devices. */ __ata_port_for_each_link(link, ap) { - sata_scr_write(link, SCR_CONTROL, link->saved_scontrol); + sata_scr_write(link, SCR_CONTROL, link->saved_scontrol & 0xff0); ata_link_for_each_dev(dev, link) ata_dev_disable(dev); } |