diff options
Diffstat (limited to 'drivers/ide/ide-iops.c')
-rw-r--r-- | drivers/ide/ide-iops.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index 16b1f6e12781..44689f5cc957 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c | |||
@@ -882,22 +882,17 @@ void ide_execute_command(ide_drive_t *drive, u8 cmd, ide_handler_t *handler, | |||
882 | unsigned long flags; | 882 | unsigned long flags; |
883 | ide_hwgroup_t *hwgroup = HWGROUP(drive); | 883 | ide_hwgroup_t *hwgroup = HWGROUP(drive); |
884 | ide_hwif_t *hwif = HWIF(drive); | 884 | ide_hwif_t *hwif = HWIF(drive); |
885 | 885 | ||
886 | spin_lock_irqsave(&ide_lock, flags); | 886 | spin_lock_irqsave(&ide_lock, flags); |
887 | |||
888 | BUG_ON(hwgroup->handler); | 887 | BUG_ON(hwgroup->handler); |
889 | hwgroup->handler = handler; | 888 | __ide_set_handler(drive, handler, timeout, expiry); |
890 | hwgroup->expiry = expiry; | ||
891 | hwgroup->timer.expires = jiffies + timeout; | ||
892 | hwgroup->req_gen_timer = hwgroup->req_gen; | ||
893 | add_timer(&hwgroup->timer); | ||
894 | hwif->OUTBSYNC(drive, cmd, IDE_COMMAND_REG); | 889 | hwif->OUTBSYNC(drive, cmd, IDE_COMMAND_REG); |
895 | /* Drive takes 400nS to respond, we must avoid the IRQ being | 890 | /* |
896 | serviced before that. | 891 | * Drive takes 400nS to respond, we must avoid the IRQ being |
897 | 892 | * serviced before that. | |
898 | FIXME: we could skip this delay with care on non shared | 893 | * |
899 | devices | 894 | * FIXME: we could skip this delay with care on non shared devices |
900 | */ | 895 | */ |
901 | ndelay(400); | 896 | ndelay(400); |
902 | spin_unlock_irqrestore(&ide_lock, flags); | 897 | spin_unlock_irqrestore(&ide_lock, flags); |
903 | } | 898 | } |