aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/via82cxxx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/via82cxxx.c')
-rw-r--r--drivers/ide/via82cxxx.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/ide/via82cxxx.c b/drivers/ide/via82cxxx.c
index 6d995fc9d4f5..6769fe252b07 100644
--- a/drivers/ide/via82cxxx.c
+++ b/drivers/ide/via82cxxx.c
@@ -169,22 +169,22 @@ static void via_set_speed(ide_hwif_t *hwif, u8 dn, struct ide_timing *timing)
169 169
170/** 170/**
171 * via_set_drive - configure transfer mode 171 * via_set_drive - configure transfer mode
172 * @hwif: port
172 * @drive: Drive to set up 173 * @drive: Drive to set up
173 * @speed: desired speed
174 * 174 *
175 * via_set_drive() computes timing values configures the chipset to 175 * via_set_drive() computes timing values configures the chipset to
176 * a desired transfer mode. It also can be called by upper layers. 176 * a desired transfer mode. It also can be called by upper layers.
177 */ 177 */
178 178
179static void via_set_drive(ide_drive_t *drive, const u8 speed) 179static void via_set_drive(ide_hwif_t *hwif, ide_drive_t *drive)
180{ 180{
181 ide_hwif_t *hwif = drive->hwif;
182 ide_drive_t *peer = ide_get_pair_dev(drive); 181 ide_drive_t *peer = ide_get_pair_dev(drive);
183 struct pci_dev *dev = to_pci_dev(hwif->dev); 182 struct pci_dev *dev = to_pci_dev(hwif->dev);
184 struct ide_host *host = pci_get_drvdata(dev); 183 struct ide_host *host = pci_get_drvdata(dev);
185 struct via82cxxx_dev *vdev = host->host_priv; 184 struct via82cxxx_dev *vdev = host->host_priv;
186 struct ide_timing t, p; 185 struct ide_timing t, p;
187 unsigned int T, UT; 186 unsigned int T, UT;
187 const u8 speed = drive->dma_mode;
188 188
189 T = 1000000000 / via_clock; 189 T = 1000000000 / via_clock;
190 190
@@ -216,7 +216,8 @@ static void via_set_drive(ide_drive_t *drive, const u8 speed)
216 216
217static void via_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive) 217static void via_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive)
218{ 218{
219 via_set_drive(drive, drive->pio_mode); 219 drive->dma_mode = drive->pio_mode;
220 via_set_drive(hwif, drive);
220} 221}
221 222
222static struct via_isa_bridge *via_config_find(struct pci_dev **isa) 223static struct via_isa_bridge *via_config_find(struct pci_dev **isa)