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>

authored by Tejun Heo and committed by Jeff Garzik fd7fe701 b33620f9

+1 -1
+1 -1
drivers/ata/libata-core.c
··· 3022 3023 if (!(status & ATA_BUSY)) 3024 return 0; 3025 - if (status == 0xff) 3026 return -ENODEV; 3027 if (time_after(now, deadline)) 3028 return -EBUSY;
··· 3022 3023 if (!(status & ATA_BUSY)) 3024 return 0; 3025 + if (!ata_port_online(ap) && status == 0xff) 3026 return -ENODEV; 3027 if (time_after(now, deadline)) 3028 return -EBUSY;