summaryrefslogtreecommitdiff
path: root/drivers/ide/ide-floppy.c
diff options
context:
space:
mode:
authorBorislav Petkov <petkovbb@gmail.com>2009-03-13 21:16:12 +0100
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-13 21:16:12 +0100
commit3eb76c1ccde496c3c0bfda23d1c803e40b762ce6 (patch)
tree2a1524a72a5005c512d4f45696d7cde964f7f457 /drivers/ide/ide-floppy.c
parent041b62374c7fedc11a8a1eeda2868612d3d1436c (diff)
ide-floppy: do not map dataless cmds to an sg
since it fails the virt_to_page() translation check with DEBUG_VIRTUAL enabled. Signed-off-by: Borislav Petkov <petkovbb@gmail.com> [bart: backport to Linus' tree] Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-floppy.c')
-rw-r--r--drivers/ide/ide-floppy.c6
1 files changed, 4 insertions, 2 deletions
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,
return ide_stopped;
}
- ide_init_sg_cmd(drive, rq);
- ide_map_sg(drive, rq);
+ if (blk_fs_request(rq) || pc->req_xfer) {
+ ide_init_sg_cmd(drive, rq);
+ ide_map_sg(drive, rq);
+ }
pc->sg = hwif->sg_table;
pc->sg_cnt = hwif->sg_nents;