ide: pass command to ide_map_sg()
[deliverable/linux.git] / drivers / ide / alim15x3.c
index d3513b6b8530aaa0b82497e0c4ec485c809853e8..e837fd9f196f0af01d16c184c725e01cdc586426 100644 (file)
@@ -191,17 +191,18 @@ static void ali_set_dma_mode(ide_drive_t *drive, const u8 speed)
 /**
  *     ali15x3_dma_setup       -       begin a DMA phase
  *     @drive: target device
+ *     @cmd: command
  *
  *     Returns 1 if the DMA cannot be performed, zero on success.
  */
 
-static int ali15x3_dma_setup(ide_drive_t *drive)
+static int ali15x3_dma_setup(ide_drive_t *drive, struct ide_cmd *cmd)
 {
        if (m5229_revision < 0xC2 && drive->media != ide_disk) {
-               if (rq_data_dir(drive->hwif->rq))
+               if (cmd->tf_flags & IDE_TFLAG_WRITE)
                        return 1;       /* try PIO instead of DMA */
        }
-       return ide_dma_setup(drive);
+       return ide_dma_setup(drive, cmd);
 }
 
 /**
This page took 0.023801 seconds and 5 git commands to generate.