Skip to content

Commit

Permalink
ide: use drive->select.all for REQ_TYPE_ATA_TASK in execute_drive_cmd()
Browse files Browse the repository at this point in the history
Use drive->select.all for REQ_TYPE_ATA_TASK requests in execute_drive_cmd()
(the obsolete bits 7 and 5 of the Device register need to be set).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Nov 13, 2007
1 parent 12eda14 commit c1f50cb
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/ide/ide-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,6 @@ static ide_startstop_t execute_drive_cmd (ide_drive_t *drive,
return do_rw_taskfile(drive, args);
} else if (rq->cmd_type == REQ_TYPE_ATA_TASK) {
u8 *args = rq->buffer;
u8 sel;

if (!args)
goto done;
Expand All @@ -903,10 +902,7 @@ static ide_startstop_t execute_drive_cmd (ide_drive_t *drive,
hwif->OUTB(args[3], IDE_SECTOR_REG);
hwif->OUTB(args[4], IDE_LCYL_REG);
hwif->OUTB(args[5], IDE_HCYL_REG);
sel = (args[6] & ~0x10);
if (drive->select.b.unit)
sel |= 0x10;
hwif->OUTB(sel, IDE_SELECT_REG);
hwif->OUTB((args[6] & 0xEF)|drive->select.all, IDE_SELECT_REG);
ide_cmd(drive, args[0], args[2], &drive_cmd_intr);
return ide_started;
} else if (rq->cmd_type == REQ_TYPE_ATA_CMD) {
Expand Down

0 comments on commit c1f50cb

Please sign in to comment.