From 2298169418f43ba5e0919762a4bab95a1227872a Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Fri, 27 Mar 2009 12:46:46 +0100 Subject: 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 Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/ide/ns87415.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/ide/ns87415.c') 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) return (dma_stat & 7) != 4; } -static int ns87415_dma_setup(ide_drive_t *drive) +static int ns87415_dma_setup(ide_drive_t *drive, struct ide_cmd *cmd) { /* select DMA xfer */ ns87415_prepare_drive(drive, 1); - if (!ide_dma_setup(drive)) + if (ide_dma_setup(drive, cmd) == 0) return 0; /* DMA failed: select PIO xfer */ ns87415_prepare_drive(drive, 0); -- cgit v1.2.1