aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/sata_via.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/sata_via.c')
-rw-r--r--drivers/ata/sata_via.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/ata/sata_via.c b/drivers/ata/sata_via.c
index 1d855f55f5f7..305ab7c68ca5 100644
--- a/drivers/ata/sata_via.c
+++ b/drivers/ata/sata_via.c
@@ -268,6 +268,7 @@ static void svia_noop_freeze(struct ata_port *ap)
268/** 268/**
269 * vt6420_prereset - prereset for vt6420 269 * vt6420_prereset - prereset for vt6420
270 * @ap: target ATA port 270 * @ap: target ATA port
271 * @deadline: deadline jiffies for the operation
271 * 272 *
272 * SCR registers on vt6420 are pieces of shit and may hang the 273 * SCR registers on vt6420 are pieces of shit and may hang the
273 * whole machine completely if accessed with the wrong timing. 274 * whole machine completely if accessed with the wrong timing.
@@ -284,7 +285,7 @@ static void svia_noop_freeze(struct ata_port *ap)
284 * RETURNS: 285 * RETURNS:
285 * 0 on success, -errno otherwise. 286 * 0 on success, -errno otherwise.
286 */ 287 */
287static int vt6420_prereset(struct ata_port *ap) 288static int vt6420_prereset(struct ata_port *ap, unsigned long deadline)
288{ 289{
289 struct ata_eh_context *ehc = &ap->eh_context; 290 struct ata_eh_context *ehc = &ap->eh_context;
290 unsigned long timeout = jiffies + (HZ * 5); 291 unsigned long timeout = jiffies + (HZ * 5);
@@ -329,7 +330,7 @@ static int vt6420_prereset(struct ata_port *ap)
329 330
330 skip_scr: 331 skip_scr:
331 /* wait for !BSY */ 332 /* wait for !BSY */
332 ata_busy_sleep(ap, ATA_TMOUT_BOOT_QUICK, ATA_TMOUT_BOOT); 333 ata_wait_ready(ap, deadline);
333 334
334 return 0; 335 return 0;
335} 336}