Do phy debouncing instead of unconditional wait after DEV_RST. Signed-off-by: Tejun Heo <htejun@xxxxxxxxx> --- drivers/scsi/sata_sil24.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) 1f6218924d908e924488ea1ce855bc1ba62f6396 diff --git a/drivers/scsi/sata_sil24.c b/drivers/scsi/sata_sil24.c index a39e8d0..89d5d70 100644 --- a/drivers/scsi/sata_sil24.c +++ b/drivers/scsi/sata_sil24.c @@ -591,7 +591,7 @@ static int sil24_hardreset(struct ata_po { void __iomem *port = (void __iomem *)ap->ioaddr.cmd_addr; const char *reason; - int tout_msec; + int tout_msec, rc; u32 tmp; /* sil24 does the right thing(tm) without any protection */ @@ -605,10 +605,14 @@ static int sil24_hardreset(struct ata_po tmp = ata_wait_register(port + PORT_CTRL_STAT, PORT_CS_DEV_RST, PORT_CS_DEV_RST, 10, tout_msec); - /* SStatus oscillates between zero and valid status for short - * duration after DEV_RST, give it time to settle. + /* SStatus oscillates between zero and valid status after + * DEV_RST, debounce it. */ - msleep(100); + rc = sata_phy_debounce(ap, sata_deb_timing_eh); + if (rc) { + reason = "PHY debouncing failed"; + goto err; + } if (tmp & PORT_CS_DEV_RST) { if (ata_port_offline(ap)) -- 1.3.2 - : send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html