diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-01-25 16:17:13 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-01-25 16:17:13 -0500 |
commit | 932aead6d21b631b2058255981824008a6eae32e (patch) | |
tree | 9b5296135df4eec2878bc25e90631d4f784bdab7 | |
parent | 3a6a3549afe7dfe212b6384106bec957bb393f3a (diff) |
ide-{floppy,tape,scsi}: fix register loading order when issuing packet command
Load IDE_BCOUNTL_REG before IDE_BCOUNTH_REG when issuing packet command.
It shouldn't affect anything (just a usual paranoia to separate changes
which change the way in which hardware is accessed from code cleanups).
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-rw-r--r-- | drivers/ide/ide-floppy.c | 2 | ||||
-rw-r--r-- | drivers/ide/ide-tape.c | 2 | ||||
-rw-r--r-- | drivers/scsi/ide-scsi.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index 830186fdcc74..d4fd064cc76c 100644 --- a/drivers/ide/ide-floppy.c +++ b/drivers/ide/ide-floppy.c | |||
@@ -1071,8 +1071,8 @@ static ide_startstop_t idefloppy_issue_pc (ide_drive_t *drive, idefloppy_pc_t *p | |||
1071 | HWIF(drive)->OUTB(drive->ctl, IDE_CONTROL_REG); | 1071 | HWIF(drive)->OUTB(drive->ctl, IDE_CONTROL_REG); |
1072 | /* Use PIO/DMA */ | 1072 | /* Use PIO/DMA */ |
1073 | hwif->OUTB(dma, IDE_FEATURE_REG); | 1073 | hwif->OUTB(dma, IDE_FEATURE_REG); |
1074 | hwif->OUTB((bcount >> 8) & 0xff, IDE_BCOUNTH_REG); | ||
1075 | hwif->OUTB(bcount & 0xff, IDE_BCOUNTL_REG); | 1074 | hwif->OUTB(bcount & 0xff, IDE_BCOUNTL_REG); |
1075 | hwif->OUTB((bcount >> 8) & 0xff, IDE_BCOUNTH_REG); | ||
1076 | HWIF(drive)->OUTB(drive->select.all, IDE_SELECT_REG); | 1076 | HWIF(drive)->OUTB(drive->select.all, IDE_SELECT_REG); |
1077 | 1077 | ||
1078 | if (dma) { /* Begin DMA, if necessary */ | 1078 | if (dma) { /* Begin DMA, if necessary */ |
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index 3539131f23f4..d1f2446739a4 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c | |||
@@ -2174,8 +2174,8 @@ static ide_startstop_t idetape_issue_packet_command (ide_drive_t *drive, idetape | |||
2174 | if (IDE_CONTROL_REG) | 2174 | if (IDE_CONTROL_REG) |
2175 | hwif->OUTB(drive->ctl, IDE_CONTROL_REG); | 2175 | hwif->OUTB(drive->ctl, IDE_CONTROL_REG); |
2176 | hwif->OUTB(dma_ok ? 1 : 0, IDE_FEATURE_REG); /* Use PIO/DMA */ | 2176 | hwif->OUTB(dma_ok ? 1 : 0, IDE_FEATURE_REG); /* Use PIO/DMA */ |
2177 | hwif->OUTB((bcount >> 8) & 0xff, IDE_BCOUNTH_REG); | ||
2178 | hwif->OUTB(bcount & 0xff, IDE_BCOUNTL_REG); | 2177 | hwif->OUTB(bcount & 0xff, IDE_BCOUNTL_REG); |
2178 | hwif->OUTB((bcount >> 8) & 0xff, IDE_BCOUNTH_REG); | ||
2179 | hwif->OUTB(drive->select.all, IDE_SELECT_REG); | 2179 | hwif->OUTB(drive->select.all, IDE_SELECT_REG); |
2180 | if (dma_ok) /* Will begin DMA later */ | 2180 | if (dma_ok) /* Will begin DMA later */ |
2181 | set_bit(PC_DMA_IN_PROGRESS, &pc->flags); | 2181 | set_bit(PC_DMA_IN_PROGRESS, &pc->flags); |
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c index ab7e8642cb88..76f0ccd2968b 100644 --- a/drivers/scsi/ide-scsi.c +++ b/drivers/scsi/ide-scsi.c | |||
@@ -594,8 +594,8 @@ static ide_startstop_t idescsi_issue_pc (ide_drive_t *drive, idescsi_pc_t *pc) | |||
594 | HWIF(drive)->OUTB(drive->ctl, IDE_CONTROL_REG); | 594 | HWIF(drive)->OUTB(drive->ctl, IDE_CONTROL_REG); |
595 | 595 | ||
596 | hwif->OUTB(dma, IDE_FEATURE_REG); | 596 | hwif->OUTB(dma, IDE_FEATURE_REG); |
597 | hwif->OUTB((bcount >> 8) & 0xff, IDE_BCOUNTH_REG); | ||
598 | hwif->OUTB(bcount & 0xff, IDE_BCOUNTL_REG); | 597 | hwif->OUTB(bcount & 0xff, IDE_BCOUNTL_REG); |
598 | hwif->OUTB((bcount >> 8) & 0xff, IDE_BCOUNTH_REG); | ||
599 | 599 | ||
600 | if (dma) | 600 | if (dma) |
601 | set_bit(PC_DMA_OK, &pc->flags); | 601 | set_bit(PC_DMA_OK, &pc->flags); |