diff options
Diffstat (limited to 'drivers/ide/ide-floppy.c')
-rw-r--r-- | drivers/ide/ide-floppy.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index 5f133dfb541c..489079b8ed03 100644 --- a/drivers/ide/ide-floppy.c +++ b/drivers/ide/ide-floppy.c | |||
@@ -396,7 +396,7 @@ static void idefloppy_retry_pc(ide_drive_t *drive) | |||
396 | } | 396 | } |
397 | 397 | ||
398 | /* The usual interrupt handler called during a packet command. */ | 398 | /* The usual interrupt handler called during a packet command. */ |
399 | static ide_startstop_t idefloppy_pc_intr (ide_drive_t *drive) | 399 | static ide_startstop_t idefloppy_pc_intr(ide_drive_t *drive) |
400 | { | 400 | { |
401 | idefloppy_floppy_t *floppy = drive->driver_data; | 401 | idefloppy_floppy_t *floppy = drive->driver_data; |
402 | ide_hwif_t *hwif = drive->hwif; | 402 | ide_hwif_t *hwif = drive->hwif; |
@@ -411,7 +411,7 @@ static ide_startstop_t idefloppy_pc_intr (ide_drive_t *drive) | |||
411 | debug_log("Reached %s interrupt handler\n", __func__); | 411 | debug_log("Reached %s interrupt handler\n", __func__); |
412 | 412 | ||
413 | if (pc->flags & PC_FLAG_DMA_IN_PROGRESS) { | 413 | if (pc->flags & PC_FLAG_DMA_IN_PROGRESS) { |
414 | dma_error = hwif->ide_dma_end(drive); | 414 | dma_error = hwif->dma_ops->dma_end(drive); |
415 | if (dma_error) { | 415 | if (dma_error) { |
416 | printk(KERN_ERR "%s: DMA %s error\n", drive->name, | 416 | printk(KERN_ERR "%s: DMA %s error\n", drive->name, |
417 | rq_data_dir(rq) ? "write" : "read"); | 417 | rq_data_dir(rq) ? "write" : "read"); |
@@ -465,10 +465,10 @@ static ide_startstop_t idefloppy_pc_intr (ide_drive_t *drive) | |||
465 | } | 465 | } |
466 | 466 | ||
467 | /* Get the number of bytes to transfer */ | 467 | /* Get the number of bytes to transfer */ |
468 | bcount = (hwif->INB(hwif->io_ports[IDE_BCOUNTH_OFFSET]) << 8) | | 468 | bcount = (hwif->INB(hwif->io_ports.lbah_addr) << 8) | |
469 | hwif->INB(hwif->io_ports[IDE_BCOUNTL_OFFSET]); | 469 | hwif->INB(hwif->io_ports.lbam_addr); |
470 | /* on this interrupt */ | 470 | /* on this interrupt */ |
471 | ireason = hwif->INB(hwif->io_ports[IDE_IREASON_OFFSET]); | 471 | ireason = hwif->INB(hwif->io_ports.nsect_addr); |
472 | 472 | ||
473 | if (ireason & CD) { | 473 | if (ireason & CD) { |
474 | printk(KERN_ERR "ide-floppy: CoD != 0 in %s\n", __func__); | 474 | printk(KERN_ERR "ide-floppy: CoD != 0 in %s\n", __func__); |
@@ -539,7 +539,7 @@ static ide_startstop_t idefloppy_transfer_pc(ide_drive_t *drive) | |||
539 | "initiated yet DRQ isn't asserted\n"); | 539 | "initiated yet DRQ isn't asserted\n"); |
540 | return startstop; | 540 | return startstop; |
541 | } | 541 | } |
542 | ireason = hwif->INB(hwif->io_ports[IDE_IREASON_OFFSET]); | 542 | ireason = hwif->INB(hwif->io_ports.nsect_addr); |
543 | if ((ireason & CD) == 0 || (ireason & IO)) { | 543 | if ((ireason & CD) == 0 || (ireason & IO)) { |
544 | printk(KERN_ERR "ide-floppy: (IO,CoD) != (0,1) while " | 544 | printk(KERN_ERR "ide-floppy: (IO,CoD) != (0,1) while " |
545 | "issuing a packet command\n"); | 545 | "issuing a packet command\n"); |
@@ -586,7 +586,7 @@ static ide_startstop_t idefloppy_transfer_pc1(ide_drive_t *drive) | |||
586 | "initiated yet DRQ isn't asserted\n"); | 586 | "initiated yet DRQ isn't asserted\n"); |
587 | return startstop; | 587 | return startstop; |
588 | } | 588 | } |
589 | ireason = hwif->INB(hwif->io_ports[IDE_IREASON_OFFSET]); | 589 | ireason = hwif->INB(hwif->io_ports.nsect_addr); |
590 | if ((ireason & CD) == 0 || (ireason & IO)) { | 590 | if ((ireason & CD) == 0 || (ireason & IO)) { |
591 | printk(KERN_ERR "ide-floppy: (IO,CoD) != (0,1) " | 591 | printk(KERN_ERR "ide-floppy: (IO,CoD) != (0,1) " |
592 | "while issuing a packet command\n"); | 592 | "while issuing a packet command\n"); |
@@ -663,7 +663,7 @@ static ide_startstop_t idefloppy_issue_pc(ide_drive_t *drive, | |||
663 | dma = 0; | 663 | dma = 0; |
664 | 664 | ||
665 | if ((pc->flags & PC_FLAG_DMA_RECOMMENDED) && drive->using_dma) | 665 | if ((pc->flags & PC_FLAG_DMA_RECOMMENDED) && drive->using_dma) |
666 | dma = !hwif->dma_setup(drive); | 666 | dma = !hwif->dma_ops->dma_setup(drive); |
667 | 667 | ||
668 | ide_pktcmd_tf_load(drive, IDE_TFLAG_NO_SELECT_MASK | | 668 | ide_pktcmd_tf_load(drive, IDE_TFLAG_NO_SELECT_MASK | |
669 | IDE_TFLAG_OUT_DEVICE, bcount, dma); | 669 | IDE_TFLAG_OUT_DEVICE, bcount, dma); |
@@ -671,7 +671,7 @@ static ide_startstop_t idefloppy_issue_pc(ide_drive_t *drive, | |||
671 | if (dma) { | 671 | if (dma) { |
672 | /* Begin DMA, if necessary */ | 672 | /* Begin DMA, if necessary */ |
673 | pc->flags |= PC_FLAG_DMA_IN_PROGRESS; | 673 | pc->flags |= PC_FLAG_DMA_IN_PROGRESS; |
674 | hwif->dma_start(drive); | 674 | hwif->dma_ops->dma_start(drive); |
675 | } | 675 | } |
676 | 676 | ||
677 | /* Can we transfer the packet when we get the interrupt or wait? */ | 677 | /* Can we transfer the packet when we get the interrupt or wait? */ |
@@ -692,7 +692,7 @@ static ide_startstop_t idefloppy_issue_pc(ide_drive_t *drive, | |||
692 | return ide_started; | 692 | return ide_started; |
693 | } else { | 693 | } else { |
694 | /* Issue the packet command */ | 694 | /* Issue the packet command */ |
695 | hwif->OUTB(WIN_PACKETCMD, hwif->io_ports[IDE_COMMAND_OFFSET]); | 695 | hwif->OUTB(WIN_PACKETCMD, hwif->io_ports.command_addr); |
696 | return (*pkt_xfer_routine) (drive); | 696 | return (*pkt_xfer_routine) (drive); |
697 | } | 697 | } |
698 | } | 698 | } |
@@ -1596,13 +1596,13 @@ static int idefloppy_revalidate_disk(struct gendisk *disk) | |||
1596 | } | 1596 | } |
1597 | 1597 | ||
1598 | static struct block_device_operations idefloppy_ops = { | 1598 | static struct block_device_operations idefloppy_ops = { |
1599 | .owner = THIS_MODULE, | 1599 | .owner = THIS_MODULE, |
1600 | .open = idefloppy_open, | 1600 | .open = idefloppy_open, |
1601 | .release = idefloppy_release, | 1601 | .release = idefloppy_release, |
1602 | .ioctl = idefloppy_ioctl, | 1602 | .ioctl = idefloppy_ioctl, |
1603 | .getgeo = idefloppy_getgeo, | 1603 | .getgeo = idefloppy_getgeo, |
1604 | .media_changed = idefloppy_media_changed, | 1604 | .media_changed = idefloppy_media_changed, |
1605 | .revalidate_disk= idefloppy_revalidate_disk | 1605 | .revalidate_disk = idefloppy_revalidate_disk |
1606 | }; | 1606 | }; |
1607 | 1607 | ||
1608 | static int ide_floppy_probe(ide_drive_t *drive) | 1608 | static int ide_floppy_probe(ide_drive_t *drive) |