diff options
Diffstat (limited to 'drivers/ide/legacy/qd65xx.c')
-rw-r--r-- | drivers/ide/legacy/qd65xx.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/ide/legacy/qd65xx.c b/drivers/ide/legacy/qd65xx.c index 7783745dd167..233905b08e93 100644 --- a/drivers/ide/legacy/qd65xx.c +++ b/drivers/ide/legacy/qd65xx.c | |||
@@ -252,38 +252,38 @@ static void qd6500_tune_drive (ide_drive_t *drive, u8 pio) | |||
252 | 252 | ||
253 | static void qd6580_tune_drive (ide_drive_t *drive, u8 pio) | 253 | static void qd6580_tune_drive (ide_drive_t *drive, u8 pio) |
254 | { | 254 | { |
255 | ide_pio_data_t d; | ||
256 | int base = HWIF(drive)->select_data; | 255 | int base = HWIF(drive)->select_data; |
256 | unsigned int cycle_time; | ||
257 | int active_time = 175; | 257 | int active_time = 175; |
258 | int recovery_time = 415; /* worst case values from the dos driver */ | 258 | int recovery_time = 415; /* worst case values from the dos driver */ |
259 | 259 | ||
260 | if (drive->id && !qd_find_disk_type(drive, &active_time, &recovery_time)) { | 260 | if (drive->id && !qd_find_disk_type(drive, &active_time, &recovery_time)) { |
261 | pio = ide_get_best_pio_mode(drive, pio, 4, &d); | 261 | pio = ide_get_best_pio_mode(drive, pio, 4, NULL); |
262 | cycle_time = ide_pio_cycle_time(drive, pio); | ||
262 | 263 | ||
263 | switch (pio) { | 264 | switch (pio) { |
264 | case 0: break; | 265 | case 0: break; |
265 | case 3: | 266 | case 3: |
266 | if (d.cycle_time >= 110) { | 267 | if (cycle_time >= 110) { |
267 | active_time = 86; | 268 | active_time = 86; |
268 | recovery_time = d.cycle_time - 102; | 269 | recovery_time = cycle_time - 102; |
269 | } else | 270 | } else |
270 | printk(KERN_WARNING "%s: Strange recovery time !\n",drive->name); | 271 | printk(KERN_WARNING "%s: Strange recovery time !\n",drive->name); |
271 | break; | 272 | break; |
272 | case 4: | 273 | case 4: |
273 | if (d.cycle_time >= 69) { | 274 | if (cycle_time >= 69) { |
274 | active_time = 70; | 275 | active_time = 70; |
275 | recovery_time = d.cycle_time - 61; | 276 | recovery_time = cycle_time - 61; |
276 | } else | 277 | } else |
277 | printk(KERN_WARNING "%s: Strange recovery time !\n",drive->name); | 278 | printk(KERN_WARNING "%s: Strange recovery time !\n",drive->name); |
278 | break; | 279 | break; |
279 | default: | 280 | default: |
280 | if (d.cycle_time >= 180) { | 281 | if (cycle_time >= 180) { |
281 | active_time = 110; | 282 | active_time = 110; |
282 | recovery_time = d.cycle_time - 120; | 283 | recovery_time = cycle_time - 120; |
283 | } else { | 284 | } else { |
284 | active_time = ide_pio_timings[pio].active_time; | 285 | active_time = ide_pio_timings[pio].active_time; |
285 | recovery_time = d.cycle_time | 286 | recovery_time = cycle_time - active_time; |
286 | -active_time; | ||
287 | } | 287 | } |
288 | } | 288 | } |
289 | printk(KERN_INFO "%s: PIO mode%d\n", drive->name,pio); | 289 | printk(KERN_INFO "%s: PIO mode%d\n", drive->name,pio); |