diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-01-25 16:17:09 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-01-25 16:17:09 -0500 |
commit | 54688aa372cbc83c4361bfb9236f9bfe02168e19 (patch) | |
tree | 35f17f7e5431823e784ae61722742bc6d122d479 /drivers/ide/ide-io.c | |
parent | 21d535c91362a1a3bbb299b2e7214c1a6971ef95 (diff) |
ide: remove ide_cmd() helper
* Remove ide_cmd() helper.
* Clear nIEN and call SELECT_MASK() before writing taskfile registers.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-io.c')
-rw-r--r-- | drivers/ide/ide-io.c | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index 98aafc5cc5ba..c5a7b3ac7c87 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
@@ -621,25 +621,6 @@ ide_startstop_t ide_abort(ide_drive_t *drive, const char *msg) | |||
621 | } | 621 | } |
622 | 622 | ||
623 | /** | 623 | /** |
624 | * ide_cmd - issue a simple drive command | ||
625 | * @drive: drive the command is for | ||
626 | * @cmd: command byte | ||
627 | * @handler: handler for the command completion | ||
628 | * | ||
629 | * Issue a simple drive command with interrupts. | ||
630 | * The drive must be selected beforehand. | ||
631 | */ | ||
632 | |||
633 | static void ide_cmd(ide_drive_t *drive, u8 cmd, ide_handler_t *handler) | ||
634 | { | ||
635 | ide_hwif_t *hwif = HWIF(drive); | ||
636 | if (IDE_CONTROL_REG) | ||
637 | hwif->OUTB(drive->ctl,IDE_CONTROL_REG); /* clear nIEN */ | ||
638 | SELECT_MASK(drive,0); | ||
639 | ide_execute_command(drive, cmd, handler, WAIT_CMD, NULL); | ||
640 | } | ||
641 | |||
642 | /** | ||
643 | * drive_cmd_intr - drive command completion interrupt | 624 | * drive_cmd_intr - drive command completion interrupt |
644 | * @drive: drive the completion interrupt occurred on | 625 | * @drive: drive the completion interrupt occurred on |
645 | * | 626 | * |
@@ -901,6 +882,11 @@ static ide_startstop_t execute_drive_cmd (ide_drive_t *drive, | |||
901 | if (args == NULL) | 882 | if (args == NULL) |
902 | goto done; | 883 | goto done; |
903 | 884 | ||
885 | if (IDE_CONTROL_REG) | ||
886 | hwif->OUTB(drive->ctl, IDE_CONTROL_REG); /* clear nIEN */ | ||
887 | |||
888 | SELECT_MASK(drive, 0); | ||
889 | |||
904 | if (rq->cmd_type == REQ_TYPE_ATA_TASK) { | 890 | if (rq->cmd_type == REQ_TYPE_ATA_TASK) { |
905 | #ifdef DEBUG | 891 | #ifdef DEBUG |
906 | printk("%s: DRIVE_TASK_CMD ", drive->name); | 892 | printk("%s: DRIVE_TASK_CMD ", drive->name); |
@@ -936,7 +922,7 @@ static ide_startstop_t execute_drive_cmd (ide_drive_t *drive, | |||
936 | hwif->OUTB(args[1], IDE_NSECTOR_REG); | 922 | hwif->OUTB(args[1], IDE_NSECTOR_REG); |
937 | } | 923 | } |
938 | 924 | ||
939 | ide_cmd(drive, args[0], &drive_cmd_intr); | 925 | ide_execute_command(drive, args[0], &drive_cmd_intr, WAIT_CMD, NULL); |
940 | return ide_started; | 926 | return ide_started; |
941 | 927 | ||
942 | done: | 928 | done: |