aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/sata_inic162x.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/sata_inic162x.c')
-rw-r--r--drivers/ata/sata_inic162x.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/ata/sata_inic162x.c b/drivers/ata/sata_inic162x.c
index f099a1d83a00..25b747e26133 100644
--- a/drivers/ata/sata_inic162x.c
+++ b/drivers/ata/sata_inic162x.c
@@ -420,7 +420,8 @@ static void inic_thaw(struct ata_port *ap)
420 * SRST and SControl hardreset don't give valid signature on this 420 * SRST and SControl hardreset don't give valid signature on this
421 * controller. Only controller specific hardreset mechanism works. 421 * controller. Only controller specific hardreset mechanism works.
422 */ 422 */
423static int inic_hardreset(struct ata_port *ap, unsigned int *class) 423static int inic_hardreset(struct ata_port *ap, unsigned int *class,
424 unsigned long deadline)
424{ 425{
425 void __iomem *port_base = inic_port_base(ap); 426 void __iomem *port_base = inic_port_base(ap);
426 void __iomem *idma_ctl = port_base + PORT_IDMA_CTL; 427 void __iomem *idma_ctl = port_base + PORT_IDMA_CTL;
@@ -437,7 +438,7 @@ static int inic_hardreset(struct ata_port *ap, unsigned int *class)
437 msleep(1); 438 msleep(1);
438 writew(val & ~IDMA_CTL_RST_ATA, idma_ctl); 439 writew(val & ~IDMA_CTL_RST_ATA, idma_ctl);
439 440
440 rc = sata_phy_resume(ap, timing); 441 rc = sata_phy_resume(ap, timing, deadline);
441 if (rc) { 442 if (rc) {
442 ata_port_printk(ap, KERN_WARNING, "failed to resume " 443 ata_port_printk(ap, KERN_WARNING, "failed to resume "
443 "link after reset (errno=%d)\n", rc); 444 "link after reset (errno=%d)\n", rc);
@@ -451,10 +452,11 @@ static int inic_hardreset(struct ata_port *ap, unsigned int *class)
451 /* wait a while before checking status */ 452 /* wait a while before checking status */
452 msleep(150); 453 msleep(150);
453 454
454 if (ata_busy_sleep(ap, ATA_TMOUT_BOOT_QUICK, ATA_TMOUT_BOOT)) { 455 rc = ata_wait_ready(ap, deadline);
455 ata_port_printk(ap, KERN_WARNING, 456 if (rc && rc != -ENODEV) {
456 "device busy after hardreset\n"); 457 ata_port_printk(ap, KERN_WARNING, "device not ready "
457 return -EIO; 458 "after hardreset (errno=%d)\n", rc);
459 return rc;
458 } 460 }
459 461
460 ata_tf_read(ap, &tf); 462 ata_tf_read(ap, &tf);