aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-floppy.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-floppy.c')
-rw-r--r--drivers/ide/ide-floppy.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
index 489079b8ed03..e2bcd3af45db 100644
--- a/drivers/ide/ide-floppy.c
+++ b/drivers/ide/ide-floppy.c
@@ -231,6 +231,7 @@ static int idefloppy_end_request(ide_drive_t *drive, int uptodate, int nsecs)
231static void ide_floppy_io_buffers(ide_drive_t *drive, struct ide_atapi_pc *pc, 231static void ide_floppy_io_buffers(ide_drive_t *drive, struct ide_atapi_pc *pc,
232 unsigned int bcount, int direction) 232 unsigned int bcount, int direction)
233{ 233{
234 ide_hwif_t *hwif = drive->hwif;
234 struct request *rq = pc->rq; 235 struct request *rq = pc->rq;
235 struct req_iterator iter; 236 struct req_iterator iter;
236 struct bio_vec *bvec; 237 struct bio_vec *bvec;
@@ -246,9 +247,9 @@ static void ide_floppy_io_buffers(ide_drive_t *drive, struct ide_atapi_pc *pc,
246 247
247 data = bvec_kmap_irq(bvec, &flags); 248 data = bvec_kmap_irq(bvec, &flags);
248 if (direction) 249 if (direction)
249 drive->hwif->atapi_output_bytes(drive, data, count); 250 hwif->output_data(drive, NULL, data, count);
250 else 251 else
251 drive->hwif->atapi_input_bytes(drive, data, count); 252 hwif->input_data(drive, NULL, data, count);
252 bvec_kunmap_irq(data, &flags); 253 bvec_kunmap_irq(data, &flags);
253 254
254 bcount -= count; 255 bcount -= count;
@@ -503,12 +504,12 @@ static ide_startstop_t idefloppy_pc_intr(ide_drive_t *drive)
503 } 504 }
504 } 505 }
505 if (pc->flags & PC_FLAG_WRITING) 506 if (pc->flags & PC_FLAG_WRITING)
506 xferfunc = hwif->atapi_output_bytes; 507 xferfunc = hwif->output_data;
507 else 508 else
508 xferfunc = hwif->atapi_input_bytes; 509 xferfunc = hwif->input_data;
509 510
510 if (pc->buf) 511 if (pc->buf)
511 xferfunc(drive, pc->cur_pos, bcount); 512 xferfunc(drive, NULL, pc->cur_pos, bcount);
512 else 513 else
513 ide_floppy_io_buffers(drive, pc, bcount, 514 ide_floppy_io_buffers(drive, pc, bcount,
514 !!(pc->flags & PC_FLAG_WRITING)); 515 !!(pc->flags & PC_FLAG_WRITING));
@@ -548,8 +549,10 @@ static ide_startstop_t idefloppy_transfer_pc(ide_drive_t *drive)
548 549
549 /* Set the interrupt routine */ 550 /* Set the interrupt routine */
550 ide_set_handler(drive, &idefloppy_pc_intr, IDEFLOPPY_WAIT_CMD, NULL); 551 ide_set_handler(drive, &idefloppy_pc_intr, IDEFLOPPY_WAIT_CMD, NULL);
552
551 /* Send the actual packet */ 553 /* Send the actual packet */
552 HWIF(drive)->atapi_output_bytes(drive, floppy->pc->c, 12); 554 hwif->output_data(drive, NULL, floppy->pc->c, 12);
555
553 return ide_started; 556 return ide_started;
554} 557}
555 558
@@ -569,7 +572,8 @@ static int idefloppy_transfer_pc2(ide_drive_t *drive)
569 idefloppy_floppy_t *floppy = drive->driver_data; 572 idefloppy_floppy_t *floppy = drive->driver_data;
570 573
571 /* Send the actual packet */ 574 /* Send the actual packet */
572 HWIF(drive)->atapi_output_bytes(drive, floppy->pc->c, 12); 575 drive->hwif->output_data(drive, NULL, floppy->pc->c, 12);
576
573 /* Timeout for the packet command */ 577 /* Timeout for the packet command */
574 return IDEFLOPPY_WAIT_CMD; 578 return IDEFLOPPY_WAIT_CMD;
575} 579}