aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pmac.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/pmac.c')
-rw-r--r--drivers/ide/pmac.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/ide/pmac.c b/drivers/ide/pmac.c
index 74625e821a43..904fb54668e8 100644
--- a/drivers/ide/pmac.c
+++ b/drivers/ide/pmac.c
@@ -1429,10 +1429,10 @@ pmac_ide_build_dmatable(ide_drive_t *drive, struct request *rq)
1429 pmac_ide_hwif_t *pmif = 1429 pmac_ide_hwif_t *pmif =
1430 (pmac_ide_hwif_t *)dev_get_drvdata(hwif->gendev.parent); 1430 (pmac_ide_hwif_t *)dev_get_drvdata(hwif->gendev.parent);
1431 struct dbdma_cmd *table; 1431 struct dbdma_cmd *table;
1432 int i, count = 0;
1433 volatile struct dbdma_regs __iomem *dma = pmif->dma_regs; 1432 volatile struct dbdma_regs __iomem *dma = pmif->dma_regs;
1434 struct scatterlist *sg; 1433 struct scatterlist *sg;
1435 int wr = (rq_data_dir(rq) == WRITE); 1434 int wr = (rq_data_dir(rq) == WRITE);
1435 int i = hwif->sg_nents, count = 0;
1436 1436
1437 /* DMA table is already aligned */ 1437 /* DMA table is already aligned */
1438 table = (struct dbdma_cmd *) pmif->dma_table_cpu; 1438 table = (struct dbdma_cmd *) pmif->dma_table_cpu;
@@ -1442,11 +1442,6 @@ pmac_ide_build_dmatable(ide_drive_t *drive, struct request *rq)
1442 while (readl(&dma->status) & RUN) 1442 while (readl(&dma->status) & RUN)
1443 udelay(1); 1443 udelay(1);
1444 1444
1445 hwif->sg_nents = i = ide_build_sglist(drive, rq);
1446
1447 if (!i)
1448 return 0;
1449
1450 /* Build DBDMA commands list */ 1445 /* Build DBDMA commands list */
1451 sg = hwif->sg_table; 1446 sg = hwif->sg_table;
1452 while (i && sg_dma_len(sg)) { 1447 while (i && sg_dma_len(sg)) {