From: Sergei Shtylyov The function ide_timing_compute() fails to *actually* take drive's specified minimum PIO/DMA cycle times into account -- when doing this, it calls ide_timing_merge() on the 'struct ide_timing' argument which contains garbage at the moment, and then ultimately destroys the read cycle time by quantizing the ide_timing[] entry, instead of copying from that entry to the argument structure, and only then doing a merge/quantize. Cc: Bartlomiej Zolnierkiewicz Cc: Alan Cox Signed-off-by: Andrew Morton --- drivers/ide/ide-timing.h | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletion(-) diff -puN drivers/ide/ide-timing.h~ide-actually-honor-drives-minimum-pio-dma-cycle-times drivers/ide/ide-timing.h --- 25/drivers/ide/ide-timing.h~ide-actually-honor-drives-minimum-pio-dma-cycle-times Wed Apr 26 14:32:33 2006 +++ 25-akpm/drivers/ide/ide-timing.h Wed Apr 26 14:32:33 2006 @@ -220,6 +220,12 @@ static int ide_timing_compute(ide_drive_ return -EINVAL; /* + * Copy the timing from the table. + */ + + *t = *s; + +/* * If the drive is an EIDE drive, it can tell us it needs extended * PIO/MWDMA cycle timing. */ @@ -247,7 +253,7 @@ static int ide_timing_compute(ide_drive_ * Convert the timing to bus clock counts. */ - ide_timing_quantize(s, t, T, UT); + ide_timing_quantize(t, t, T, UT); /* * Even in DMA/UDMA modes we still use PIO access for IDENTIFY, S.M.A.R.T _