summaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-dma.c')
-rw-r--r--drivers/ide/ide-dma.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c
index a878f47..12c11b7 100644
--- a/drivers/ide/ide-dma.c
+++ b/drivers/ide/ide-dma.c
@@ -138,14 +138,15 @@ int ide_build_sglist(ide_drive_t *drive, struct request *rq)
hwif->sg_dma_direction = DMA_TO_DEVICE;
i = dma_map_sg(hwif->dev, sg, hwif->sg_nents, hwif->sg_dma_direction);
- if (i) {
+ if (i == 0)
+ ide_map_sg(drive, rq);
+ else {
hwif->orig_sg_nents = hwif->sg_nents;
hwif->sg_nents = i;
}
return i;
}
-EXPORT_SYMBOL_GPL(ide_build_sglist);
/**
* ide_destroy_dmatable - clean up DMA mapping
OpenPOWER on IntegriCloud