diff options
Diffstat (limited to 'drivers/ide/ide-eh.c')
-rw-r--r-- | drivers/ide/ide-eh.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/ide/ide-eh.c b/drivers/ide/ide-eh.c index 11664976eea3..5d5fb961b5ce 100644 --- a/drivers/ide/ide-eh.c +++ b/drivers/ide/ide-eh.c | |||
@@ -165,11 +165,12 @@ static ide_startstop_t do_reset1(ide_drive_t *, int); | |||
165 | static ide_startstop_t atapi_reset_pollfunc(ide_drive_t *drive) | 165 | static ide_startstop_t atapi_reset_pollfunc(ide_drive_t *drive) |
166 | { | 166 | { |
167 | ide_hwif_t *hwif = drive->hwif; | 167 | ide_hwif_t *hwif = drive->hwif; |
168 | const struct ide_tp_ops *tp_ops = hwif->tp_ops; | ||
168 | u8 stat; | 169 | u8 stat; |
169 | 170 | ||
170 | SELECT_DRIVE(drive); | 171 | tp_ops->dev_select(drive); |
171 | udelay(10); | 172 | udelay(10); |
172 | stat = hwif->tp_ops->read_status(hwif); | 173 | stat = tp_ops->read_status(hwif); |
173 | 174 | ||
174 | if (OK_STAT(stat, 0, ATA_BUSY)) | 175 | if (OK_STAT(stat, 0, ATA_BUSY)) |
175 | printk(KERN_INFO "%s: ATAPI reset complete\n", drive->name); | 176 | printk(KERN_INFO "%s: ATAPI reset complete\n", drive->name); |
@@ -348,7 +349,7 @@ static ide_startstop_t do_reset1(ide_drive_t *drive, int do_not_try_atapi) | |||
348 | /* For an ATAPI device, first try an ATAPI SRST. */ | 349 | /* For an ATAPI device, first try an ATAPI SRST. */ |
349 | if (drive->media != ide_disk && !do_not_try_atapi) { | 350 | if (drive->media != ide_disk && !do_not_try_atapi) { |
350 | pre_reset(drive); | 351 | pre_reset(drive); |
351 | SELECT_DRIVE(drive); | 352 | tp_ops->dev_select(drive); |
352 | udelay(20); | 353 | udelay(20); |
353 | tp_ops->exec_command(hwif, ATA_CMD_DEV_RESET); | 354 | tp_ops->exec_command(hwif, ATA_CMD_DEV_RESET); |
354 | ndelay(400); | 355 | ndelay(400); |
@@ -401,15 +402,14 @@ static ide_startstop_t do_reset1(ide_drive_t *drive, int do_not_try_atapi) | |||
401 | * immediate interrupt due to the edge transition it produces. | 402 | * immediate interrupt due to the edge transition it produces. |
402 | * This single interrupt gives us a "fast poll" for drives that | 403 | * This single interrupt gives us a "fast poll" for drives that |
403 | * recover from reset very quickly, saving us the first 50ms wait time. | 404 | * recover from reset very quickly, saving us the first 50ms wait time. |
404 | * | ||
405 | * TODO: add ->softreset method and stop abusing ->set_irq | ||
406 | */ | 405 | */ |
407 | /* set SRST and nIEN */ | 406 | /* set SRST and nIEN */ |
408 | tp_ops->set_irq(hwif, 4); | 407 | tp_ops->write_devctl(hwif, ATA_SRST | ATA_NIEN | ATA_DEVCTL_OBS); |
409 | /* more than enough time */ | 408 | /* more than enough time */ |
410 | udelay(10); | 409 | udelay(10); |
411 | /* clear SRST, leave nIEN (unless device is on the quirk list) */ | 410 | /* clear SRST, leave nIEN (unless device is on the quirk list) */ |
412 | tp_ops->set_irq(hwif, drive->quirk_list == 2); | 411 | tp_ops->write_devctl(hwif, (drive->quirk_list == 2 ? 0 : ATA_NIEN) | |
412 | ATA_DEVCTL_OBS); | ||
413 | /* more than enough time */ | 413 | /* more than enough time */ |
414 | udelay(10); | 414 | udelay(10); |
415 | hwif->poll_timeout = jiffies + WAIT_WORSTCASE; | 415 | hwif->poll_timeout = jiffies + WAIT_WORSTCASE; |