Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 76227
b: refs/heads/master
c: 54688aa
h: refs/heads/master
i:
  76225: c0f56e4
  76223: 42c4039
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Jan 25, 2008
1 parent 3135882 commit faf52e4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 21d535c91362a1a3bbb299b2e7214c1a6971ef95
refs/heads/master: 54688aa372cbc83c4361bfb9236f9bfe02168e19
26 changes: 6 additions & 20 deletions trunk/drivers/ide/ide-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -620,25 +620,6 @@ ide_startstop_t ide_abort(ide_drive_t *drive, const char *msg)
return __ide_abort(drive, rq);
}

/**
* ide_cmd - issue a simple drive command
* @drive: drive the command is for
* @cmd: command byte
* @handler: handler for the command completion
*
* Issue a simple drive command with interrupts.
* The drive must be selected beforehand.
*/

static void ide_cmd(ide_drive_t *drive, u8 cmd, ide_handler_t *handler)
{
ide_hwif_t *hwif = HWIF(drive);
if (IDE_CONTROL_REG)
hwif->OUTB(drive->ctl,IDE_CONTROL_REG); /* clear nIEN */
SELECT_MASK(drive,0);
ide_execute_command(drive, cmd, handler, WAIT_CMD, NULL);
}

/**
* drive_cmd_intr - drive command completion interrupt
* @drive: drive the completion interrupt occurred on
Expand Down Expand Up @@ -901,6 +882,11 @@ static ide_startstop_t execute_drive_cmd (ide_drive_t *drive,
if (args == NULL)
goto done;

if (IDE_CONTROL_REG)
hwif->OUTB(drive->ctl, IDE_CONTROL_REG); /* clear nIEN */

SELECT_MASK(drive, 0);

if (rq->cmd_type == REQ_TYPE_ATA_TASK) {
#ifdef DEBUG
printk("%s: DRIVE_TASK_CMD ", drive->name);
Expand Down Expand Up @@ -936,7 +922,7 @@ static ide_startstop_t execute_drive_cmd (ide_drive_t *drive,
hwif->OUTB(args[1], IDE_NSECTOR_REG);
}

ide_cmd(drive, args[0], &drive_cmd_intr);
ide_execute_command(drive, args[0], &drive_cmd_intr, WAIT_CMD, NULL);
return ide_started;

done:
Expand Down

0 comments on commit faf52e4

Please sign in to comment.