Hello.

Sergei Shtylyov wrote:

diff -Nrup 01_remove_from_ide_cd/drivers/ide/ide-cd.c 
02_add_to_ide_intr/drivers/ide/ide-cd.c
--- 01_remove_from_ide_cd/drivers/ide/ide-cd.c    2007-01-24 11:00:03.000000000 
+0800
+++ 02_add_to_ide_intr/drivers/ide/ide-cd.c    2007-01-25 16:52:20.000000000 
+0800
@@ -923,6 +923,10 @@ static ide_startstop_t cdrom_start_packe
         HWIF(drive)->OUTB(drive->ctl, IDE_CONTROL_REG);
       if (CDROM_CONFIG_FLAGS (drive)->drq_interrupt) {
+        /* waiting for CDB interrupt, not DMA yet. */
+        if (info->dma)
+            drive->waiting_for_dma = 0;
+
         /* packet command */
         ide_execute_command(drive, WIN_PACKETCMD, handler, ATAPI_WAIT_PC, 
cdrom_timer_expiry);
         return ide_started;
@@ -965,6 +969,10 @@ static ide_startstop_t cdrom_transfer_pa
         /* Check for errors. */
         if (cdrom_decode_status(drive, DRQ_STAT, NULL))
             return ide_stopped;
+
+        /* Ok, next interrupt will be dma interrupt. */
+        if (info->dma)
+            drive->waiting_for_dma = 1;
     } else {
         /* Otherwise, we must wait for DRQ to get set. */
         if (ide_wait_stat(&startstop, drive, DRQ_STAT,

Erm... shouldn't we set drive->waiting_for_dma in hwif->dma_start() then? Why it's set in hwif->dma_setup() at all I wonder?

   Well, it'll become raicy as well then... Isn't it ugly. :-/

MBR, Sergei
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to