aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/alim15x3.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/alim15x3.c')
-rw-r--r--drivers/ide/alim15x3.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/ide/alim15x3.c b/drivers/ide/alim15x3.c
index d3513b6b8530..e837fd9f196f 100644
--- a/drivers/ide/alim15x3.c
+++ b/drivers/ide/alim15x3.c
@@ -191,17 +191,18 @@ static void ali_set_dma_mode(ide_drive_t *drive, const u8 speed)
191/** 191/**
192 * ali15x3_dma_setup - begin a DMA phase 192 * ali15x3_dma_setup - begin a DMA phase
193 * @drive: target device 193 * @drive: target device
194 * @cmd: command
194 * 195 *
195 * Returns 1 if the DMA cannot be performed, zero on success. 196 * Returns 1 if the DMA cannot be performed, zero on success.
196 */ 197 */
197 198
198static int ali15x3_dma_setup(ide_drive_t *drive) 199static int ali15x3_dma_setup(ide_drive_t *drive, struct ide_cmd *cmd)
199{ 200{
200 if (m5229_revision < 0xC2 && drive->media != ide_disk) { 201 if (m5229_revision < 0xC2 && drive->media != ide_disk) {
201 if (rq_data_dir(drive->hwif->rq)) 202 if (cmd->tf_flags & IDE_TFLAG_WRITE)
202 return 1; /* try PIO instead of DMA */ 203 return 1; /* try PIO instead of DMA */
203 } 204 }
204 return ide_dma_setup(drive); 205 return ide_dma_setup(drive, cmd);
205} 206}
206 207
207/** 208/**