diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-11-13 16:09:15 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-11-13 16:09:15 -0500 |
commit | c1f50cbb06363b36700c0a679a5bd3ddef0a97b6 (patch) | |
tree | 2af4adaeed66428cd555020ac3337ccbb6f1bddd | |
parent | 12eda14f8930ccad0d8b75fecab87b90eecba5fb (diff) |
ide: use drive->select.all for REQ_TYPE_ATA_TASK in execute_drive_cmd()
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>
-rw-r--r-- | drivers/ide/ide-io.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index 755011827afa..db22d1ff4e55 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
@@ -885,7 +885,6 @@ static ide_startstop_t execute_drive_cmd (ide_drive_t *drive, | |||
885 | return do_rw_taskfile(drive, args); | 885 | return do_rw_taskfile(drive, args); |
886 | } else if (rq->cmd_type == REQ_TYPE_ATA_TASK) { | 886 | } else if (rq->cmd_type == REQ_TYPE_ATA_TASK) { |
887 | u8 *args = rq->buffer; | 887 | u8 *args = rq->buffer; |
888 | u8 sel; | ||
889 | 888 | ||
890 | if (!args) | 889 | if (!args) |
891 | goto done; | 890 | goto done; |
@@ -903,10 +902,7 @@ static ide_startstop_t execute_drive_cmd (ide_drive_t *drive, | |||
903 | hwif->OUTB(args[3], IDE_SECTOR_REG); | 902 | hwif->OUTB(args[3], IDE_SECTOR_REG); |
904 | hwif->OUTB(args[4], IDE_LCYL_REG); | 903 | hwif->OUTB(args[4], IDE_LCYL_REG); |
905 | hwif->OUTB(args[5], IDE_HCYL_REG); | 904 | hwif->OUTB(args[5], IDE_HCYL_REG); |
906 | sel = (args[6] & ~0x10); | 905 | hwif->OUTB((args[6] & 0xEF)|drive->select.all, IDE_SELECT_REG); |
907 | if (drive->select.b.unit) | ||
908 | sel |= 0x10; | ||
909 | hwif->OUTB(sel, IDE_SELECT_REG); | ||
910 | ide_cmd(drive, args[0], args[2], &drive_cmd_intr); | 906 | ide_cmd(drive, args[0], args[2], &drive_cmd_intr); |
911 | return ide_started; | 907 | return ide_started; |
912 | } else if (rq->cmd_type == REQ_TYPE_ATA_CMD) { | 908 | } else if (rq->cmd_type == REQ_TYPE_ATA_CMD) { |