]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.39/patches.drivers/libata-dont-restore-DET-on-detach
Fix oinkmaster patch.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.drivers / libata-dont-restore-DET-on-detach
1 From: Tejun Heo <tj@kernel.org>
2 Subject: libata: mask off DET when restoring SControl for detach
3 References: bnc#440980
4
5 libata restores SControl on detach; however, trying to restore
6 non-zero DET can cause undeterministic behavior including PMP device
7 going offline till power cycling. Mask off DET when restoring
8 SControl.
9
10 Signed-off-by: Tejun Heo <tj@kernel.org>
11 Signed-off-by: Tejun Heo <teheo@suse.de>
12 ---
13 drivers/ata/libata-core.c | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16 --- a/drivers/ata/libata-core.c
17 +++ b/drivers/ata/libata-core.c
18 @@ -5874,7 +5874,7 @@ static void ata_port_detach(struct ata_p
19 * to us. Restore SControl and disable all existing devices.
20 */
21 __ata_port_for_each_link(link, ap) {
22 - sata_scr_write(link, SCR_CONTROL, link->saved_scontrol);
23 + sata_scr_write(link, SCR_CONTROL, link->saved_scontrol & 0xff0);
24 ata_link_for_each_dev(dev, link)
25 ata_dev_disable(dev);
26 }