From: Tejun Heo Date: Wed, 23 May 2007 09:22:15 +0000 (+0200) Subject: libata: don't consider 0xff as port empty if SStatus is available X-Git-Tag: v2.6.22-rc3~10^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fd7fe701612e42fb8780d7bf61fbb0467a488c9b;p=platform%2Fkernel%2Flinux-3.10.git 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 Cc: Paul Mundt Cc: Indan Zupancic Signed-off-by: Jeff Garzik --- diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index a6de57e..5788a9d 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) if (!(status & ATA_BUSY)) return 0; - if (status == 0xff) + if (!ata_port_online(ap) && status == 0xff) return -ENODEV; if (time_after(now, deadline)) return -EBUSY;