diff options
Diffstat (limited to 'drivers/ide/pci/via82cxxx.c')
-rw-r--r-- | drivers/ide/pci/via82cxxx.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/ide/pci/via82cxxx.c b/drivers/ide/pci/via82cxxx.c index e3bf90736332..2fc4f8835f19 100644 --- a/drivers/ide/pci/via82cxxx.c +++ b/drivers/ide/pci/via82cxxx.c | |||
@@ -195,19 +195,16 @@ static int via_set_drive(ide_drive_t *drive, const u8 speed) | |||
195 | } | 195 | } |
196 | 196 | ||
197 | /** | 197 | /** |
198 | * via82cxxx_tune_drive - PIO setup | 198 | * via_set_pio_mode - PIO setup |
199 | * @drive: drive to set up | 199 | * @drive: drive |
200 | * @pio: mode to use (255 for 'best possible') | 200 | * @pio: PIO mode number |
201 | * | 201 | * |
202 | * A callback from the upper layers for PIO-only tuning. | 202 | * A callback from the upper layers for PIO-only tuning. |
203 | */ | 203 | */ |
204 | 204 | ||
205 | static void via82cxxx_tune_drive(ide_drive_t *drive, u8 pio) | 205 | static void via_set_pio_mode(ide_drive_t *drive, const u8 pio) |
206 | { | 206 | { |
207 | if (pio == 255) | 207 | via_set_drive(drive, XFER_PIO_0 + pio); |
208 | pio = ide_get_best_pio_mode(drive, 255, 5); | ||
209 | |||
210 | via_set_drive(drive, XFER_PIO_0 + min_t(u8, pio, 5)); | ||
211 | } | 208 | } |
212 | 209 | ||
213 | /** | 210 | /** |
@@ -223,7 +220,7 @@ static int via82cxxx_ide_dma_check (ide_drive_t *drive) | |||
223 | u8 speed = ide_max_dma_mode(drive); | 220 | u8 speed = ide_max_dma_mode(drive); |
224 | 221 | ||
225 | if (speed == 0) { | 222 | if (speed == 0) { |
226 | via82cxxx_tune_drive(drive, 255); | 223 | ide_set_max_pio(drive); |
227 | return -1; | 224 | return -1; |
228 | } | 225 | } |
229 | 226 | ||
@@ -465,7 +462,7 @@ static void __devinit init_hwif_via82cxxx(ide_hwif_t *hwif) | |||
465 | 462 | ||
466 | hwif->autodma = 0; | 463 | hwif->autodma = 0; |
467 | 464 | ||
468 | hwif->tuneproc = &via82cxxx_tune_drive; | 465 | hwif->set_pio_mode = &via_set_pio_mode; |
469 | hwif->speedproc = &via_set_drive; | 466 | hwif->speedproc = &via_set_drive; |
470 | 467 | ||
471 | 468 | ||