diff options
Diffstat (limited to 'drivers/ata/sata_sil24.c')
-rw-r--r-- | drivers/ata/sata_sil24.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/ata/sata_sil24.c b/drivers/ata/sata_sil24.c index e6223ba667da..b97ee9f31aec 100644 --- a/drivers/ata/sata_sil24.c +++ b/drivers/ata/sata_sil24.c | |||
@@ -534,7 +534,8 @@ static int sil24_init_port(struct ata_port *ap) | |||
534 | return 0; | 534 | return 0; |
535 | } | 535 | } |
536 | 536 | ||
537 | static int sil24_softreset(struct ata_port *ap, unsigned int *class) | 537 | static int sil24_softreset(struct ata_port *ap, unsigned int *class, |
538 | unsigned long deadline) | ||
538 | { | 539 | { |
539 | void __iomem *port = ap->ioaddr.cmd_addr; | 540 | void __iomem *port = ap->ioaddr.cmd_addr; |
540 | struct sil24_port_priv *pp = ap->private_data; | 541 | struct sil24_port_priv *pp = ap->private_data; |
@@ -566,7 +567,7 @@ static int sil24_softreset(struct ata_port *ap, unsigned int *class) | |||
566 | 567 | ||
567 | mask = (PORT_IRQ_COMPLETE | PORT_IRQ_ERROR) << PORT_IRQ_RAW_SHIFT; | 568 | mask = (PORT_IRQ_COMPLETE | PORT_IRQ_ERROR) << PORT_IRQ_RAW_SHIFT; |
568 | irq_stat = ata_wait_register(port + PORT_IRQ_STAT, mask, 0x0, | 569 | irq_stat = ata_wait_register(port + PORT_IRQ_STAT, mask, 0x0, |
569 | 100, ATA_TMOUT_BOOT / HZ * 1000); | 570 | 100, jiffies_to_msecs(deadline - jiffies)); |
570 | 571 | ||
571 | writel(irq_stat, port + PORT_IRQ_STAT); /* clear IRQs */ | 572 | writel(irq_stat, port + PORT_IRQ_STAT); /* clear IRQs */ |
572 | irq_stat >>= PORT_IRQ_RAW_SHIFT; | 573 | irq_stat >>= PORT_IRQ_RAW_SHIFT; |
@@ -594,7 +595,8 @@ static int sil24_softreset(struct ata_port *ap, unsigned int *class) | |||
594 | return -EIO; | 595 | return -EIO; |
595 | } | 596 | } |
596 | 597 | ||
597 | static int sil24_hardreset(struct ata_port *ap, unsigned int *class) | 598 | static int sil24_hardreset(struct ata_port *ap, unsigned int *class, |
599 | unsigned long deadline) | ||
598 | { | 600 | { |
599 | void __iomem *port = ap->ioaddr.cmd_addr; | 601 | void __iomem *port = ap->ioaddr.cmd_addr; |
600 | const char *reason; | 602 | const char *reason; |
@@ -615,7 +617,7 @@ static int sil24_hardreset(struct ata_port *ap, unsigned int *class) | |||
615 | /* SStatus oscillates between zero and valid status after | 617 | /* SStatus oscillates between zero and valid status after |
616 | * DEV_RST, debounce it. | 618 | * DEV_RST, debounce it. |
617 | */ | 619 | */ |
618 | rc = sata_phy_debounce(ap, sata_deb_timing_long); | 620 | rc = sata_phy_debounce(ap, sata_deb_timing_long, deadline); |
619 | if (rc) { | 621 | if (rc) { |
620 | reason = "PHY debouncing failed"; | 622 | reason = "PHY debouncing failed"; |
621 | goto err; | 623 | goto err; |