diff options
Diffstat (limited to 'drivers/ide/ide-disk.c')
-rw-r--r-- | drivers/ide/ide-disk.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c index f1555dd4e6a5..d00d807c0f53 100644 --- a/drivers/ide/ide-disk.c +++ b/drivers/ide/ide-disk.c | |||
@@ -104,14 +104,14 @@ static ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq, | |||
104 | lba48 = 0; | 104 | lba48 = 0; |
105 | } | 105 | } |
106 | 106 | ||
107 | if (!dma) { | ||
108 | ide_init_sg_cmd(drive, rq); | ||
109 | ide_map_sg(drive, rq); | ||
110 | } | ||
111 | |||
112 | memset(&cmd, 0, sizeof(cmd)); | 107 | memset(&cmd, 0, sizeof(cmd)); |
113 | cmd.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE; | 108 | cmd.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE; |
114 | 109 | ||
110 | if (dma == 0) { | ||
111 | ide_init_sg_cmd(&cmd, nsectors); | ||
112 | ide_map_sg(drive, rq); | ||
113 | } | ||
114 | |||
115 | if (drive->dev_flags & IDE_DFLAG_LBA) { | 115 | if (drive->dev_flags & IDE_DFLAG_LBA) { |
116 | if (lba48) { | 116 | if (lba48) { |
117 | pr_debug("%s: LBA=0x%012llx\n", drive->name, | 117 | pr_debug("%s: LBA=0x%012llx\n", drive->name, |
@@ -170,7 +170,7 @@ static ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq, | |||
170 | /* fallback to PIO */ | 170 | /* fallback to PIO */ |
171 | cmd.tf_flags |= IDE_TFLAG_DMA_PIO_FALLBACK; | 171 | cmd.tf_flags |= IDE_TFLAG_DMA_PIO_FALLBACK; |
172 | ide_tf_set_cmd(drive, &cmd, 0); | 172 | ide_tf_set_cmd(drive, &cmd, 0); |
173 | ide_init_sg_cmd(drive, rq); | 173 | ide_init_sg_cmd(&cmd, nsectors); |
174 | rc = do_rw_taskfile(drive, &cmd); | 174 | rc = do_rw_taskfile(drive, &cmd); |
175 | } | 175 | } |
176 | 176 | ||