]> err.no Git - linux-2.6/commitdiff
ide-{floppy,tape,scsi}: fix register loading order when issuing packet command
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 25 Jan 2008 21:17:13 +0000 (22:17 +0100)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 25 Jan 2008 21:17:13 +0000 (22:17 +0100)
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>
drivers/ide/ide-floppy.c
drivers/ide/ide-tape.c
drivers/scsi/ide-scsi.c

index 830186fdcc745933059ca0ced510b7fee2679276..d4fd064cc76c56516e5ecdc6d963d0a87e6aedae 100644 (file)
@@ -1071,8 +1071,8 @@ static ide_startstop_t idefloppy_issue_pc (ide_drive_t *drive, idefloppy_pc_t *p
                HWIF(drive)->OUTB(drive->ctl, IDE_CONTROL_REG);
        /* Use PIO/DMA */
        hwif->OUTB(dma, IDE_FEATURE_REG);
-       hwif->OUTB((bcount >> 8) & 0xff, IDE_BCOUNTH_REG);
        hwif->OUTB(bcount & 0xff, IDE_BCOUNTL_REG);
+       hwif->OUTB((bcount >> 8) & 0xff, IDE_BCOUNTH_REG);
        HWIF(drive)->OUTB(drive->select.all, IDE_SELECT_REG);
 
        if (dma) {      /* Begin DMA, if necessary */
index 3539131f23f4b915c9b4afa7305bbc1dd3cf24df..d1f2446739a447a8199c9d98794920e3dad3b240 100644 (file)
@@ -2174,8 +2174,8 @@ static ide_startstop_t idetape_issue_packet_command (ide_drive_t *drive, idetape
        if (IDE_CONTROL_REG)
                hwif->OUTB(drive->ctl, IDE_CONTROL_REG);
        hwif->OUTB(dma_ok ? 1 : 0, IDE_FEATURE_REG);    /* Use PIO/DMA */
-       hwif->OUTB((bcount >> 8) & 0xff, IDE_BCOUNTH_REG);
        hwif->OUTB(bcount & 0xff, IDE_BCOUNTL_REG);
+       hwif->OUTB((bcount >> 8) & 0xff, IDE_BCOUNTH_REG);
        hwif->OUTB(drive->select.all, IDE_SELECT_REG);
        if (dma_ok)                     /* Will begin DMA later */
                set_bit(PC_DMA_IN_PROGRESS, &pc->flags);
index ab7e8642cb886cedeeaa63e5aa99be95284fd84c..76f0ccd2968b76168663e128961edfc504b9b687 100644 (file)
@@ -594,8 +594,8 @@ static ide_startstop_t idescsi_issue_pc (ide_drive_t *drive, idescsi_pc_t *pc)
                HWIF(drive)->OUTB(drive->ctl, IDE_CONTROL_REG);
 
        hwif->OUTB(dma, IDE_FEATURE_REG);
-       hwif->OUTB((bcount >> 8) & 0xff, IDE_BCOUNTH_REG);
        hwif->OUTB(bcount & 0xff, IDE_BCOUNTL_REG);
+       hwif->OUTB((bcount >> 8) & 0xff, IDE_BCOUNTH_REG);
 
        if (dma)
                set_bit(PC_DMA_OK, &pc->flags);