diff options
Diffstat (limited to 'drivers/ide/aec62xx.c')
-rw-r--r-- | drivers/ide/aec62xx.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/ide/aec62xx.c b/drivers/ide/aec62xx.c index 878f8ec6dbe1..57d00caefc86 100644 --- a/drivers/ide/aec62xx.c +++ b/drivers/ide/aec62xx.c | |||
@@ -81,15 +81,15 @@ static u8 pci_bus_clock_list_ultra (u8 speed, struct chipset_bus_clock_list_entr | |||
81 | return chipset_table->ultra_settings; | 81 | return chipset_table->ultra_settings; |
82 | } | 82 | } |
83 | 83 | ||
84 | static void aec6210_set_mode(ide_drive_t *drive, const u8 speed) | 84 | static void aec6210_set_mode(ide_hwif_t *hwif, ide_drive_t *drive) |
85 | { | 85 | { |
86 | ide_hwif_t *hwif = drive->hwif; | ||
87 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 86 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
88 | struct ide_host *host = pci_get_drvdata(dev); | 87 | struct ide_host *host = pci_get_drvdata(dev); |
89 | struct chipset_bus_clock_list_entry *bus_clock = host->host_priv; | 88 | struct chipset_bus_clock_list_entry *bus_clock = host->host_priv; |
90 | u16 d_conf = 0; | 89 | u16 d_conf = 0; |
91 | u8 ultra = 0, ultra_conf = 0; | 90 | u8 ultra = 0, ultra_conf = 0; |
92 | u8 tmp0 = 0, tmp1 = 0, tmp2 = 0; | 91 | u8 tmp0 = 0, tmp1 = 0, tmp2 = 0; |
92 | const u8 speed = drive->dma_mode; | ||
93 | unsigned long flags; | 93 | unsigned long flags; |
94 | 94 | ||
95 | local_irq_save(flags); | 95 | local_irq_save(flags); |
@@ -109,15 +109,15 @@ static void aec6210_set_mode(ide_drive_t *drive, const u8 speed) | |||
109 | local_irq_restore(flags); | 109 | local_irq_restore(flags); |
110 | } | 110 | } |
111 | 111 | ||
112 | static void aec6260_set_mode(ide_drive_t *drive, const u8 speed) | 112 | static void aec6260_set_mode(ide_hwif_t *hwif, ide_drive_t *drive) |
113 | { | 113 | { |
114 | ide_hwif_t *hwif = drive->hwif; | ||
115 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 114 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
116 | struct ide_host *host = pci_get_drvdata(dev); | 115 | struct ide_host *host = pci_get_drvdata(dev); |
117 | struct chipset_bus_clock_list_entry *bus_clock = host->host_priv; | 116 | struct chipset_bus_clock_list_entry *bus_clock = host->host_priv; |
118 | u8 unit = drive->dn & 1; | 117 | u8 unit = drive->dn & 1; |
119 | u8 tmp1 = 0, tmp2 = 0; | 118 | u8 tmp1 = 0, tmp2 = 0; |
120 | u8 ultra = 0, drive_conf = 0, ultra_conf = 0; | 119 | u8 ultra = 0, drive_conf = 0, ultra_conf = 0; |
120 | const u8 speed = drive->dma_mode; | ||
121 | unsigned long flags; | 121 | unsigned long flags; |
122 | 122 | ||
123 | local_irq_save(flags); | 123 | local_irq_save(flags); |
@@ -134,9 +134,10 @@ static void aec6260_set_mode(ide_drive_t *drive, const u8 speed) | |||
134 | local_irq_restore(flags); | 134 | local_irq_restore(flags); |
135 | } | 135 | } |
136 | 136 | ||
137 | static void aec_set_pio_mode(ide_drive_t *drive, const u8 pio) | 137 | static void aec_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive) |
138 | { | 138 | { |
139 | drive->hwif->port_ops->set_dma_mode(drive, pio + XFER_PIO_0); | 139 | drive->dma_mode = drive->pio_mode; |
140 | hwif->port_ops->set_dma_mode(hwif, drive); | ||
140 | } | 141 | } |
141 | 142 | ||
142 | static int init_chipset_aec62xx(struct pci_dev *dev) | 143 | static int init_chipset_aec62xx(struct pci_dev *dev) |