diff options
author | Tejun Heo <htejun@gmail.com> | 2007-05-23 05:22:15 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-05-24 20:34:48 -0400 |
commit | fd7fe701612e42fb8780d7bf61fbb0467a488c9b (patch) | |
tree | 1a0d15da4d5169417b05953f4a00e07f4c4a27d2 | |
parent | b33620f9fa6a8deabaac7a7cd827cc7fafbf0064 (diff) |
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: tejun Heo <htejun@gmail.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Indan Zupancic <indan@nul.nu>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
-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 a6de57e02047..5788a9dd0445 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -3022,7 +3022,7 @@ int ata_wait_ready(struct ata_port *ap, unsigned long deadline) | |||
3022 | 3022 | ||
3023 | if (!(status & ATA_BUSY)) | 3023 | if (!(status & ATA_BUSY)) |
3024 | return 0; | 3024 | return 0; |
3025 | if (status == 0xff) | 3025 | if (!ata_port_online(ap) && status == 0xff) |
3026 | return -ENODEV; | 3026 | return -ENODEV; |
3027 | if (time_after(now, deadline)) | 3027 | if (time_after(now, deadline)) |
3028 | return -EBUSY; | 3028 | return -EBUSY; |