diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2009-03-31 14:15:30 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-31 14:15:30 -0400 |
commit | ecf3a31d2a08a419bdf919456f1724f5b72bde2c (patch) | |
tree | 11a5b4685425541fa4bb267ac6f897cb1c38ba41 /drivers/ide/ide-eh.c | |
parent | 4d74c3fcf2b90487eacec511bc8c07177711c81c (diff) |
ide: turn set_irq() method into write_devctl() method
Turn set_irq() method with its software reset hack into write_devctl() method
(for just writing a value into the device control register) at last...
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-eh.c')
-rw-r--r-- | drivers/ide/ide-eh.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/ide/ide-eh.c b/drivers/ide/ide-eh.c index 11664976eea3..de4b7f1c9c9f 100644 --- a/drivers/ide/ide-eh.c +++ b/drivers/ide/ide-eh.c | |||
@@ -401,15 +401,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. | 401 | * immediate interrupt due to the edge transition it produces. |
402 | * This single interrupt gives us a "fast poll" for drives that | 402 | * This single interrupt gives us a "fast poll" for drives that |
403 | * recover from reset very quickly, saving us the first 50ms wait time. | 403 | * recover from reset very quickly, saving us the first 50ms wait time. |
404 | * | ||
405 | * TODO: add ->softreset method and stop abusing ->set_irq | ||
406 | */ | 404 | */ |
407 | /* set SRST and nIEN */ | 405 | /* set SRST and nIEN */ |
408 | tp_ops->set_irq(hwif, 4); | 406 | tp_ops->write_devctl(hwif, ATA_SRST | ATA_NIEN | ATA_DEVCTL_OBS); |
409 | /* more than enough time */ | 407 | /* more than enough time */ |
410 | udelay(10); | 408 | udelay(10); |
411 | /* clear SRST, leave nIEN (unless device is on the quirk list) */ | 409 | /* clear SRST, leave nIEN (unless device is on the quirk list) */ |
412 | tp_ops->set_irq(hwif, drive->quirk_list == 2); | 410 | tp_ops->write_devctl(hwif, (drive->quirk_list == 2 ? 0 : ATA_NIEN) | |
411 | ATA_DEVCTL_OBS); | ||
413 | /* more than enough time */ | 412 | /* more than enough time */ |
414 | udelay(10); | 413 | udelay(10); |
415 | hwif->poll_timeout = jiffies + WAIT_WORSTCASE; | 414 | hwif->poll_timeout = jiffies + WAIT_WORSTCASE; |