Commit:     3a6a3549afe7dfe212b6384106bec957bb393f3a
Parent:     8e7657ae0f56c14882e53ffdae8055c2b1624de1
Author:     Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
AuthorDate: Fri Jan 25 22:17:13 2008 +0100
Committer:  Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
CommitDate: Fri Jan 25 22:17:13 2008 +0100

    ide-cd: fix register loading order in cdrom_start_packet_command()
    Load IDE_CONTROL_REG before other registers in cdrom_start_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).
    While at it move misplaced FIXME comment in the right place.
    Acked-by: Sergei Shtylyov <[EMAIL PROTECTED]>
    Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
 drivers/ide/ide-cd.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index c7d77f0..855a23c 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -917,19 +917,19 @@ static ide_startstop_t 
cdrom_start_packet_command(ide_drive_t *drive,
        if (ide_wait_stat(&startstop, drive, 0, BUSY_STAT, WAIT_READY))
                return startstop;
+       /* FIXME: for Virtual DMA we must check harder */
        if (info->dma)
                info->dma = !hwif->dma_setup(drive);
        /* Set up the controller registers. */
-       /* FIXME: for Virtual DMA we must check harder */
+       if (IDE_CONTROL_REG)
+               HWIF(drive)->OUTB(drive->ctl, IDE_CONTROL_REG);
        HWIF(drive)->OUTB(info->dma, IDE_FEATURE_REG);
        HWIF(drive)->OUTB(0, IDE_IREASON_REG);
        HWIF(drive)->OUTB(0, IDE_SECTOR_REG);
        HWIF(drive)->OUTB(xferlen & 0xff, IDE_BCOUNTL_REG);
        HWIF(drive)->OUTB(xferlen >> 8  , IDE_BCOUNTH_REG);
-       if (IDE_CONTROL_REG)
-               HWIF(drive)->OUTB(drive->ctl, IDE_CONTROL_REG);
        if (CDROM_CONFIG_FLAGS (drive)->drq_interrupt) {
                /* waiting for CDB interrupt, not DMA yet. */
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to