diff options
-rw-r--r-- | drivers/ide/ide-atapi.c | 12 | ||||
-rw-r--r-- | drivers/ide/ide-floppy.c | 6 |
2 files changed, 16 insertions, 2 deletions
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c index e96c01260598..e9d042dba0e0 100644 --- a/drivers/ide/ide-atapi.c +++ b/drivers/ide/ide-atapi.c | |||
@@ -140,6 +140,12 @@ static void ide_queue_pc_head(ide_drive_t *drive, struct gendisk *disk, | |||
140 | rq->cmd_flags |= REQ_PREEMPT; | 140 | rq->cmd_flags |= REQ_PREEMPT; |
141 | rq->buffer = (char *)pc; | 141 | rq->buffer = (char *)pc; |
142 | rq->rq_disk = disk; | 142 | rq->rq_disk = disk; |
143 | |||
144 | if (pc->req_xfer) { | ||
145 | rq->data = pc->buf; | ||
146 | rq->data_len = pc->req_xfer; | ||
147 | } | ||
148 | |||
143 | memcpy(rq->cmd, pc->c, 12); | 149 | memcpy(rq->cmd, pc->c, 12); |
144 | if (drive->media == ide_tape) | 150 | if (drive->media == ide_tape) |
145 | rq->cmd[13] = REQ_IDETAPE_PC1; | 151 | rq->cmd[13] = REQ_IDETAPE_PC1; |
@@ -159,6 +165,12 @@ int ide_queue_pc_tail(ide_drive_t *drive, struct gendisk *disk, | |||
159 | rq = blk_get_request(drive->queue, READ, __GFP_WAIT); | 165 | rq = blk_get_request(drive->queue, READ, __GFP_WAIT); |
160 | rq->cmd_type = REQ_TYPE_SPECIAL; | 166 | rq->cmd_type = REQ_TYPE_SPECIAL; |
161 | rq->buffer = (char *)pc; | 167 | rq->buffer = (char *)pc; |
168 | |||
169 | if (pc->req_xfer) { | ||
170 | rq->data = pc->buf; | ||
171 | rq->data_len = pc->req_xfer; | ||
172 | } | ||
173 | |||
162 | memcpy(rq->cmd, pc->c, 12); | 174 | memcpy(rq->cmd, pc->c, 12); |
163 | if (drive->media == ide_tape) | 175 | if (drive->media == ide_tape) |
164 | rq->cmd[13] = REQ_IDETAPE_PC1; | 176 | rq->cmd[13] = REQ_IDETAPE_PC1; |
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index 3eab1c6c9b31..317ec62c33d4 100644 --- a/drivers/ide/ide-floppy.c +++ b/drivers/ide/ide-floppy.c | |||
@@ -327,8 +327,10 @@ static ide_startstop_t ide_floppy_do_request(ide_drive_t *drive, | |||
327 | return ide_stopped; | 327 | return ide_stopped; |
328 | } | 328 | } |
329 | 329 | ||
330 | ide_init_sg_cmd(drive, rq); | 330 | if (blk_fs_request(rq) || pc->req_xfer) { |
331 | ide_map_sg(drive, rq); | 331 | ide_init_sg_cmd(drive, rq); |
332 | ide_map_sg(drive, rq); | ||
333 | } | ||
332 | 334 | ||
333 | pc->sg = hwif->sg_table; | 335 | pc->sg = hwif->sg_table; |
334 | pc->sg_cnt = hwif->sg_nents; | 336 | pc->sg_cnt = hwif->sg_nents; |