aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/tx4939ide.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-31 14:15:21 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-31 14:15:21 -0400
commit11998b316173f814698f9037ce9179d634d1f423 (patch)
tree468bc633384c3bb4cd32754fd853c07fcd54afbc /drivers/ide/tx4939ide.c
parent8a4a5738ba499083cf4c5668895efe220b1946d3 (diff)
ide: move ide_map_sg() call out of ->dma_setup method (take 2)
Move ide_map_sg() call from ->dma_setup implementations and ide_destroy_dmatable() one from *_build_dmatable() to ide_dma_prepare(). There should be no functional changes caused by this patch. Sergei: Removed 'use_pio_instead' labels and replaced 'goto' with 'return 0' -- that required no changes to the follow-up patches... Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/tx4939ide.c')
-rw-r--r--drivers/ide/tx4939ide.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/ide/tx4939ide.c b/drivers/ide/tx4939ide.c
index f62ced855cf3..7267c46c07cd 100644
--- a/drivers/ide/tx4939ide.c
+++ b/drivers/ide/tx4939ide.c
@@ -279,8 +279,6 @@ use_pio_instead:
279 printk(KERN_ERR "%s: %s\n", drive->name, 279 printk(KERN_ERR "%s: %s\n", drive->name,
280 count ? "DMA table too small" : "empty DMA table?"); 280 count ? "DMA table too small" : "empty DMA table?");
281 281
282 ide_destroy_dmatable(drive);
283
284 return 0; /* revert to PIO for this request */ 282 return 0; /* revert to PIO for this request */
285} 283}
286#else 284#else
@@ -294,10 +292,8 @@ static int tx4939ide_dma_setup(ide_drive_t *drive, struct ide_cmd *cmd)
294 u8 rw = (cmd->tf_flags & IDE_TFLAG_WRITE) ? 0 : ATA_DMA_WR; 292 u8 rw = (cmd->tf_flags & IDE_TFLAG_WRITE) ? 0 : ATA_DMA_WR;
295 293
296 /* fall back to PIO! */ 294 /* fall back to PIO! */
297 if (tx4939ide_build_dmatable(drive, cmd) == 0) { 295 if (tx4939ide_build_dmatable(drive, cmd) == 0)
298 ide_map_sg(drive, cmd);
299 return 1; 296 return 1;
300 }
301 297
302 /* PRD table */ 298 /* PRD table */
303 tx4939ide_writel(hwif->dmatable_dma, base, TX4939IDE_PRD_Ptr); 299 tx4939ide_writel(hwif->dmatable_dma, base, TX4939IDE_PRD_Ptr);