aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ns87415.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-27 07:46:46 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-27 07:46:46 -0400
commit2298169418f43ba5e0919762a4bab95a1227872a (patch)
tree67cf3133c7bae747ad957c68a650534105a7d8e7 /drivers/ide/ns87415.c
parent130e886708d6e11f3d54e5d27c266578de56f343 (diff)
ide: pass command to ide_map_sg()
* Set IDE_TFLAG_WRITE flag and ->rq also for ATA_CMD_PACKET commands. * Pass command to ->dma_setup method and update all its implementations accordingly. * Pass command instead of request to ide_build_sglist(), *_build_dmatable() and ide_map_sg(). While at it: * Fix scc_dma_setup() documentation + use ATA_DMA_WR define. * Rename sgiioc4_build_dma_table() to sgiioc4_build_dmatable(), change return value type to 'int' and drop unused 'ddir' argument. * Do some minor cleanups in [tx4939]ide_dma_setup(). There should be no functional changes caused by this patch. Acked-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ns87415.c')
-rw-r--r--drivers/ide/ns87415.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ide/ns87415.c b/drivers/ide/ns87415.c
index d93c80016326..cf6d9a9c8a27 100644
--- a/drivers/ide/ns87415.c
+++ b/drivers/ide/ns87415.c
@@ -216,11 +216,11 @@ static int ns87415_dma_end(ide_drive_t *drive)
216 return (dma_stat & 7) != 4; 216 return (dma_stat & 7) != 4;
217} 217}
218 218
219static int ns87415_dma_setup(ide_drive_t *drive) 219static int ns87415_dma_setup(ide_drive_t *drive, struct ide_cmd *cmd)
220{ 220{
221 /* select DMA xfer */ 221 /* select DMA xfer */
222 ns87415_prepare_drive(drive, 1); 222 ns87415_prepare_drive(drive, 1);
223 if (!ide_dma_setup(drive)) 223 if (ide_dma_setup(drive, cmd) == 0)
224 return 0; 224 return 0;
225 /* DMA failed: select PIO xfer */ 225 /* DMA failed: select PIO xfer */
226 ns87415_prepare_drive(drive, 0); 226 ns87415_prepare_drive(drive, 0);