[50/64] ide-timings: use ->pio_mode value to determine fastest PIO speed

Message ID 20100118172058.14623.81306.sendpatchset@localhost
State Accepted
Delegated to: David Miller
Headers show

Commit Message

Bartlomiej Zolnierkiewicz Jan. 18, 2010, 5:20 p.m.
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [PATCH] ide-timings: use ->pio_mode value to determine fastest PIO speed

Use the current PIO mode value instead of the physical maximum one
to determine the fastest allowed PIO for shared PIO/DMA timings.

Affected host drivers: amd74xx and via82cxxx.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
 drivers/ide/ide-timings.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Index: b/drivers/ide/ide-timings.c
--- a/drivers/ide/ide-timings.c
+++ b/drivers/ide/ide-timings.c
@@ -189,8 +189,7 @@  int ide_timing_compute(ide_drive_t *driv
 	 * DMA cycle timing is slower/equal than the fastest PIO timing.
 	if (speed >= XFER_SW_DMA_0) {
-		u8 pio = ide_get_best_pio_mode(drive, 255, 5);
-		ide_timing_compute(drive, XFER_PIO_0 + pio, &p, T, UT);
+		ide_timing_compute(drive, drive->pio_mode, &p, T, UT);
 		ide_timing_merge(&p, t, t, IDE_TIMING_ALL);