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

libata: don't consider 0xff as port empty if SStatus is available

Some SATA controllers (sata_sil) use 0xff to indicate port not ready
status, not port empty.  As libata interprets 0xff as port empty, this
causes unnecessary reset failure and retry.  Don't consider 0xff as
port empty if SStatus is available and indicates that port is online.
Signed-off-by: default avatartejun Heo <htejun@gmail.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Indan Zupancic <indan@nul.nu>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent b33620f9
...@@ -3022,7 +3022,7 @@ int ata_wait_ready(struct ata_port *ap, unsigned long deadline) ...@@ -3022,7 +3022,7 @@ int ata_wait_ready(struct ata_port *ap, unsigned long deadline)
if (!(status & ATA_BUSY)) if (!(status & ATA_BUSY))
return 0; return 0;
if (status == 0xff) if (!ata_port_online(ap) && status == 0xff)
return -ENODEV; return -ENODEV;
if (time_after(now, deadline)) if (time_after(now, deadline))
return -EBUSY; return -EBUSY;
......
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