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 | 3a6a3549afe7dfe212b6384106bec957bb393f3a (patch) | |
tree | b007158eb759fc0a9d3561a939d19acfc443efb9 /drivers/ide/ide-cd.c | |
parent | 8e7657ae0f56c14882e53ffdae8055c2b1624de1 (diff) |
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 <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-cd.c')
-rw-r--r-- | 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 c7d77f0ad892..855a23c1c815 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, | |||
917 | if (ide_wait_stat(&startstop, drive, 0, BUSY_STAT, WAIT_READY)) | 917 | if (ide_wait_stat(&startstop, drive, 0, BUSY_STAT, WAIT_READY)) |
918 | return startstop; | 918 | return startstop; |
919 | 919 | ||
920 | /* FIXME: for Virtual DMA we must check harder */ | ||
920 | if (info->dma) | 921 | if (info->dma) |
921 | info->dma = !hwif->dma_setup(drive); | 922 | info->dma = !hwif->dma_setup(drive); |
922 | 923 | ||
923 | /* Set up the controller registers. */ | 924 | /* Set up the controller registers. */ |
924 | /* FIXME: for Virtual DMA we must check harder */ | 925 | if (IDE_CONTROL_REG) |
926 | HWIF(drive)->OUTB(drive->ctl, IDE_CONTROL_REG); | ||
925 | HWIF(drive)->OUTB(info->dma, IDE_FEATURE_REG); | 927 | HWIF(drive)->OUTB(info->dma, IDE_FEATURE_REG); |
926 | HWIF(drive)->OUTB(0, IDE_IREASON_REG); | 928 | HWIF(drive)->OUTB(0, IDE_IREASON_REG); |
927 | HWIF(drive)->OUTB(0, IDE_SECTOR_REG); | 929 | HWIF(drive)->OUTB(0, IDE_SECTOR_REG); |
928 | 930 | ||
929 | HWIF(drive)->OUTB(xferlen & 0xff, IDE_BCOUNTL_REG); | 931 | HWIF(drive)->OUTB(xferlen & 0xff, IDE_BCOUNTL_REG); |
930 | HWIF(drive)->OUTB(xferlen >> 8 , IDE_BCOUNTH_REG); | 932 | HWIF(drive)->OUTB(xferlen >> 8 , IDE_BCOUNTH_REG); |
931 | if (IDE_CONTROL_REG) | ||
932 | HWIF(drive)->OUTB(drive->ctl, IDE_CONTROL_REG); | ||
933 | 933 | ||
934 | if (CDROM_CONFIG_FLAGS (drive)->drq_interrupt) { | 934 | if (CDROM_CONFIG_FLAGS (drive)->drq_interrupt) { |
935 | /* waiting for CDB interrupt, not DMA yet. */ | 935 | /* waiting for CDB interrupt, not DMA yet. */ |