diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-28 17:44:41 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-28 17:44:41 -0400 |
commit | 9f87abe892f899f19df8d472f937ee955cd6264b (patch) | |
tree | f42dda5a9c12c043e3190de7dd43b0cee8e00c8b /drivers/ide/ide-floppy.c | |
parent | 7c0daf2681f140dd9f39cd95966f471b5c904d8a (diff) |
ide: add ide_pad_transfer() helper
* Add ide_pad_transfer() helper (which uses ->{in,out}put_data methods
internally so the transfer is also padded to drive+host requirements)
and use it instead of ide_atapi_{write_zeros,discard_data}().
* Remove no longer needed ide_atapi_{write_zeros,discard_data}().
Cc: Borislav Petkov <petkovbb@gmail.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-floppy.c')
-rw-r--r-- | drivers/ide/ide-floppy.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index 0039789b0eb9..f05fbc2bd7a8 100644 --- a/drivers/ide/ide-floppy.c +++ b/drivers/ide/ide-floppy.c | |||
@@ -262,10 +262,7 @@ static void ide_floppy_io_buffers(ide_drive_t *drive, struct ide_atapi_pc *pc, | |||
262 | if (bcount) { | 262 | if (bcount) { |
263 | printk(KERN_ERR "%s: leftover data in %s, bcount == %d\n", | 263 | printk(KERN_ERR "%s: leftover data in %s, bcount == %d\n", |
264 | drive->name, __func__, bcount); | 264 | drive->name, __func__, bcount); |
265 | if (direction) | 265 | ide_pad_transfer(drive, direction, bcount); |
266 | ide_atapi_write_zeros(drive, bcount); | ||
267 | else | ||
268 | ide_atapi_discard_data(drive, bcount); | ||
269 | } | 266 | } |
270 | } | 267 | } |
271 | 268 | ||
@@ -491,7 +488,7 @@ static ide_startstop_t idefloppy_pc_intr(ide_drive_t *drive) | |||
491 | printk(KERN_ERR "ide-floppy: The floppy wants " | 488 | printk(KERN_ERR "ide-floppy: The floppy wants " |
492 | "to send us more data than expected " | 489 | "to send us more data than expected " |
493 | "- discarding data\n"); | 490 | "- discarding data\n"); |
494 | ide_atapi_discard_data(drive, bcount); | 491 | ide_pad_transfer(drive, 0, bcount); |
495 | 492 | ||
496 | ide_set_handler(drive, | 493 | ide_set_handler(drive, |
497 | &idefloppy_pc_intr, | 494 | &idefloppy_pc_intr, |