aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-cd.c
diff options
context:
space:
mode:
authorAlbert Lee <albertcc@tw.ibm.com>2007-02-16 20:40:21 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-02-16 20:40:21 -0500
commitf0dd8712eb8cc5687b4582fbc41cfbcd55bba0d2 (patch)
tree190bc6cf68e056ae72d895dc2c9074de2c0ed18f /drivers/ide/ide-cd.c
parentfdb77da4ca68ae17a39d58c9d5c00479a7e124c0 (diff)
ide: clear bmdma status in ide_intr() for ICHx controllers (revised #4)
patch 1/2 (revised): - Fix drive->waiting_for_dma to work with CDB-intr devices. - Do the dma status clearing in ide_intr() and add a new hwif->ide_dma_clear_irq for Intel ICHx controllers. Revised per Alan, Sergei and Bart's advice. Patch against 2.6.20-rc6. Tested ok on my ICH4 and pdc20275 adapters. Please review/apply, thanks. Signed-off-by: Albert Lee <albertcc@tw.ibm.com> Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: "Adam W. Hawks" <awhawks@us.ibm.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-cd.c')
-rw-r--r--drivers/ide/ide-cd.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 5969cec58dc..21f4ae2b717 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -930,6 +930,10 @@ static ide_startstop_t cdrom_start_packet_command(ide_drive_t *drive,
930 HWIF(drive)->OUTB(drive->ctl, IDE_CONTROL_REG); 930 HWIF(drive)->OUTB(drive->ctl, IDE_CONTROL_REG);
931 931
932 if (CDROM_CONFIG_FLAGS (drive)->drq_interrupt) { 932 if (CDROM_CONFIG_FLAGS (drive)->drq_interrupt) {
933 /* waiting for CDB interrupt, not DMA yet. */
934 if (info->dma)
935 drive->waiting_for_dma = 0;
936
933 /* packet command */ 937 /* packet command */
934 ide_execute_command(drive, WIN_PACKETCMD, handler, ATAPI_WAIT_PC, cdrom_timer_expiry); 938 ide_execute_command(drive, WIN_PACKETCMD, handler, ATAPI_WAIT_PC, cdrom_timer_expiry);
935 return ide_started; 939 return ide_started;
@@ -972,6 +976,10 @@ static ide_startstop_t cdrom_transfer_packet_command (ide_drive_t *drive,
972 /* Check for errors. */ 976 /* Check for errors. */
973 if (cdrom_decode_status(drive, DRQ_STAT, NULL)) 977 if (cdrom_decode_status(drive, DRQ_STAT, NULL))
974 return ide_stopped; 978 return ide_stopped;
979
980 /* Ok, next interrupt will be DMA interrupt. */
981 if (info->dma)
982 drive->waiting_for_dma = 1;
975 } else { 983 } else {
976 /* Otherwise, we must wait for DRQ to get set. */ 984 /* Otherwise, we must wait for DRQ to get set. */
977 if (ide_wait_stat(&startstop, drive, DRQ_STAT, 985 if (ide_wait_stat(&startstop, drive, DRQ_STAT,