diff options
Diffstat (limited to 'drivers/ide/cs5520.c')
-rw-r--r-- | drivers/ide/cs5520.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/ide/cs5520.c b/drivers/ide/cs5520.c index 09f98ed0731f..2c1e5f7cd261 100644 --- a/drivers/ide/cs5520.c +++ b/drivers/ide/cs5520.c | |||
@@ -57,11 +57,11 @@ static struct pio_clocks cs5520_pio_clocks[]={ | |||
57 | {1, 2, 1} | 57 | {1, 2, 1} |
58 | }; | 58 | }; |
59 | 59 | ||
60 | static void cs5520_set_pio_mode(ide_drive_t *drive, const u8 pio) | 60 | static void cs5520_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive) |
61 | { | 61 | { |
62 | ide_hwif_t *hwif = drive->hwif; | ||
63 | struct pci_dev *pdev = to_pci_dev(hwif->dev); | 62 | struct pci_dev *pdev = to_pci_dev(hwif->dev); |
64 | int controller = drive->dn > 1 ? 1 : 0; | 63 | int controller = drive->dn > 1 ? 1 : 0; |
64 | const u8 pio = drive->pio_mode - XFER_PIO_0; | ||
65 | 65 | ||
66 | /* 8bit CAT/CRT - 8bit command timing for channel */ | 66 | /* 8bit CAT/CRT - 8bit command timing for channel */ |
67 | pci_write_config_byte(pdev, 0x62 + controller, | 67 | pci_write_config_byte(pdev, 0x62 + controller, |
@@ -81,11 +81,12 @@ static void cs5520_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
81 | (cs5520_pio_clocks[pio].assert)); | 81 | (cs5520_pio_clocks[pio].assert)); |
82 | } | 82 | } |
83 | 83 | ||
84 | static void cs5520_set_dma_mode(ide_drive_t *drive, const u8 speed) | 84 | static void cs5520_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive) |
85 | { | 85 | { |
86 | printk(KERN_ERR "cs55x0: bad ide timing.\n"); | 86 | printk(KERN_ERR "cs55x0: bad ide timing.\n"); |
87 | 87 | ||
88 | cs5520_set_pio_mode(drive, 0); | 88 | drive->pio_mode = XFER_PIO_0 + 0; |
89 | cs5520_set_pio_mode(hwif, drive); | ||
89 | } | 90 | } |
90 | 91 | ||
91 | static const struct ide_port_ops cs5520_port_ops = { | 92 | static const struct ide_port_ops cs5520_port_ops = { |