libata: retry link resume if necessary

Interestingly, when SIDPR is used in ata_piix, writes to DET in
SControl sometimes get ignored leading to detection failure.  Update
sata_link_resume() such that it reads back SControl after clearing DET
and retry if it's not clear.

Signed-off-by: Tejun Heo <>
Reported-by: fengxiangjun <>
Reported-by: Jim Faulkner <>
Signed-off-by: Jeff Garzik <>
2 files changed