diff options
Diffstat (limited to 'drivers/ide/ide-floppy.c')
-rw-r--r-- | drivers/ide/ide-floppy.c | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index 973f5f6c815e..170c60d93f55 100644 --- a/drivers/ide/ide-floppy.c +++ b/drivers/ide/ide-floppy.c | |||
@@ -230,23 +230,6 @@ static void ide_floppy_put(struct ide_floppy_obj *floppy) | |||
230 | } | 230 | } |
231 | 231 | ||
232 | /* | 232 | /* |
233 | * Too bad. The drive wants to send us data which we are not ready to accept. | ||
234 | * Just throw it away. | ||
235 | */ | ||
236 | static void idefloppy_discard_data(ide_drive_t *drive, unsigned int bcount) | ||
237 | { | ||
238 | while (bcount--) | ||
239 | (void) HWIF(drive)->INB(IDE_DATA_REG); | ||
240 | } | ||
241 | |||
242 | static void idefloppy_write_zeros(ide_drive_t *drive, unsigned int bcount) | ||
243 | { | ||
244 | while (bcount--) | ||
245 | HWIF(drive)->OUTB(0, IDE_DATA_REG); | ||
246 | } | ||
247 | |||
248 | |||
249 | /* | ||
250 | * Used to finish servicing a request. For read/write requests, we will call | 233 | * Used to finish servicing a request. For read/write requests, we will call |
251 | * ide_end_request to pass to the next buffer. | 234 | * ide_end_request to pass to the next buffer. |
252 | */ | 235 | */ |
@@ -313,10 +296,9 @@ static void ide_floppy_io_buffers(ide_drive_t *drive, idefloppy_pc_t *pc, | |||
313 | printk(KERN_ERR "%s: leftover data in %s, bcount == %d\n", | 296 | printk(KERN_ERR "%s: leftover data in %s, bcount == %d\n", |
314 | drive->name, __func__, bcount); | 297 | drive->name, __func__, bcount); |
315 | if (direction) | 298 | if (direction) |
316 | idefloppy_write_zeros(drive, bcount); | 299 | ide_atapi_write_zeros(drive, bcount); |
317 | else | 300 | else |
318 | idefloppy_discard_data(drive, bcount); | 301 | ide_atapi_discard_data(drive, bcount); |
319 | |||
320 | } | 302 | } |
321 | } | 303 | } |
322 | 304 | ||
@@ -541,7 +523,7 @@ static ide_startstop_t idefloppy_pc_intr (ide_drive_t *drive) | |||
541 | printk(KERN_ERR "ide-floppy: The floppy wants " | 523 | printk(KERN_ERR "ide-floppy: The floppy wants " |
542 | "to send us more data than expected " | 524 | "to send us more data than expected " |
543 | "- discarding data\n"); | 525 | "- discarding data\n"); |
544 | idefloppy_discard_data(drive, bcount); | 526 | ide_atapi_discard_data(drive, bcount); |
545 | 527 | ||
546 | ide_set_handler(drive, | 528 | ide_set_handler(drive, |
547 | &idefloppy_pc_intr, | 529 | &idefloppy_pc_intr, |