]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/ide/ide-atapi.c
ide-atapi: start DMA after issuing a packet command
[mv-sheeva.git] / drivers / ide / ide-atapi.c
index 2fb5d28a9be5e16bf73833c5e9c5c7db8511ab89..f591166d2c9335739de34748d688e82880d476e1 100644 (file)
@@ -6,6 +6,8 @@
 #include <linux/cdrom.h>
 #include <linux/delay.h>
 #include <linux/ide.h>
+#include <linux/scatterlist.h>
+
 #include <scsi/scsi.h>
 
 #ifdef DEBUG
@@ -611,6 +613,10 @@ static ide_startstop_t ide_transfer_pc(ide_drive_t *drive)
                                             : ide_pc_intr),
                        timeout);
 
+       /* Send the actual packet */
+       if ((drive->atapi_flags & IDE_AFLAG_ZIP_DRIVE) == 0)
+               hwif->tp_ops->output_data(drive, NULL, rq->cmd, cmd_len);
+
        /* Begin DMA, if necessary */
        if (dev_is_idecd(drive)) {
                if (drive->dma)
@@ -622,10 +628,6 @@ static ide_startstop_t ide_transfer_pc(ide_drive_t *drive)
                }
        }
 
-       /* Send the actual packet */
-       if ((drive->atapi_flags & IDE_AFLAG_ZIP_DRIVE) == 0)
-               hwif->tp_ops->output_data(drive, NULL, rq->cmd, cmd_len);
-
        return ide_started;
 }