aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/au1xxx-ide.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/au1xxx-ide.c')
-rw-r--r--drivers/ide/au1xxx-ide.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/ide/au1xxx-ide.c b/drivers/ide/au1xxx-ide.c
index 82f153810eb9..3fc3ced8192c 100644
--- a/drivers/ide/au1xxx-ide.c
+++ b/drivers/ide/au1xxx-ide.c
@@ -211,21 +211,16 @@ static void auide_set_dma_mode(ide_drive_t *drive, const u8 speed)
211#ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA 211#ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA
212static int auide_build_dmatable(ide_drive_t *drive) 212static int auide_build_dmatable(ide_drive_t *drive)
213{ 213{
214 int i, iswrite, count = 0;
215 ide_hwif_t *hwif = drive->hwif; 214 ide_hwif_t *hwif = drive->hwif;
216 struct request *rq = hwif->rq; 215 struct request *rq = hwif->rq;
217 _auide_hwif *ahwif = &auide_hwif; 216 _auide_hwif *ahwif = &auide_hwif;
218 struct scatterlist *sg; 217 struct scatterlist *sg;
218 int i = hwif->sg_nents, iswrite, count = 0;
219 219
220 iswrite = (rq_data_dir(rq) == WRITE); 220 iswrite = (rq_data_dir(rq) == WRITE);
221 /* Save for interrupt context */ 221 /* Save for interrupt context */
222 ahwif->drive = drive; 222 ahwif->drive = drive;
223 223
224 hwif->sg_nents = i = ide_build_sglist(drive, rq);
225
226 if (!i)
227 return 0;
228
229 /* fill the descriptors */ 224 /* fill the descriptors */
230 sg = hwif->sg_table; 225 sg = hwif->sg_table;
231 while (i && sg_dma_len(sg)) { 226 while (i && sg_dma_len(sg)) {