diff options
Diffstat (limited to 'drivers/ide/ide-floppy.c')
-rw-r--r-- | drivers/ide/ide-floppy.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index 650981758f15..a1c55985d4ae 100644 --- a/drivers/ide/ide-floppy.c +++ b/drivers/ide/ide-floppy.c | |||
@@ -210,7 +210,7 @@ static void idefloppy_create_rw_cmd(ide_drive_t *drive, | |||
210 | if (rq->cmd_flags & REQ_RW) | 210 | if (rq->cmd_flags & REQ_RW) |
211 | pc->flags |= PC_FLAG_WRITING; | 211 | pc->flags |= PC_FLAG_WRITING; |
212 | pc->buf = NULL; | 212 | pc->buf = NULL; |
213 | pc->req_xfer = pc->buf_size = blocks * floppy->block_size; | 213 | pc->buf_size = blk_rq_bytes(rq); |
214 | pc->flags |= PC_FLAG_DMA_OK; | 214 | pc->flags |= PC_FLAG_DMA_OK; |
215 | } | 215 | } |
216 | 216 | ||
@@ -227,7 +227,7 @@ static void idefloppy_blockpc_cmd(struct ide_disk_obj *floppy, | |||
227 | } | 227 | } |
228 | /* pio will be performed by ide_pio_bytes() which handles sg fine */ | 228 | /* pio will be performed by ide_pio_bytes() which handles sg fine */ |
229 | pc->buf = NULL; | 229 | pc->buf = NULL; |
230 | pc->req_xfer = pc->buf_size = blk_rq_bytes(rq); | 230 | pc->buf_size = blk_rq_bytes(rq); |
231 | } | 231 | } |
232 | 232 | ||
233 | static ide_startstop_t ide_floppy_do_request(ide_drive_t *drive, | 233 | static ide_startstop_t ide_floppy_do_request(ide_drive_t *drive, |
@@ -286,8 +286,8 @@ static ide_startstop_t ide_floppy_do_request(ide_drive_t *drive, | |||
286 | 286 | ||
287 | cmd.rq = rq; | 287 | cmd.rq = rq; |
288 | 288 | ||
289 | if (blk_fs_request(rq) || pc->req_xfer) { | 289 | if (blk_fs_request(rq) || blk_rq_bytes(rq)) { |
290 | ide_init_sg_cmd(&cmd, pc->req_xfer); | 290 | ide_init_sg_cmd(&cmd, blk_rq_bytes(rq)); |
291 | ide_map_sg(drive, &cmd); | 291 | ide_map_sg(drive, &cmd); |
292 | } | 292 | } |
293 | 293 | ||