aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorSergei Shtylyov <sshtylyov@ru.mvista.com>2006-06-26 03:26:15 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-26 12:58:27 -0400
commit17c1033d331a430ce631805e15215e63b4cce764 (patch)
tree3ec734f17ecc4a77116388947e8ee96426ee2d01 /drivers/ide
parent178184b60979992508130741f16499c360bc9c9a (diff)
[PATCH] ide: actually honor drive's minimum PIO/DMA cycle times
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 <B.Zolnierkiewicz@elka.pw.edu.pl> Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-timing.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/ide/ide-timing.h b/drivers/ide/ide-timing.h
index 2fcfac6e967a..c0864b1e9228 100644
--- a/drivers/ide/ide-timing.h
+++ b/drivers/ide/ide-timing.h
@@ -220,6 +220,12 @@ static int ide_timing_compute(ide_drive_t *drive, short speed, struct ide_timing
220 return -EINVAL; 220 return -EINVAL;
221 221
222/* 222/*
223 * Copy the timing from the table.
224 */
225
226 *t = *s;
227
228/*
223 * If the drive is an EIDE drive, it can tell us it needs extended 229 * If the drive is an EIDE drive, it can tell us it needs extended
224 * PIO/MWDMA cycle timing. 230 * PIO/MWDMA cycle timing.
225 */ 231 */
@@ -247,7 +253,7 @@ static int ide_timing_compute(ide_drive_t *drive, short speed, struct ide_timing
247 * Convert the timing to bus clock counts. 253 * Convert the timing to bus clock counts.
248 */ 254 */
249 255
250 ide_timing_quantize(s, t, T, UT); 256 ide_timing_quantize(t, t, T, UT);
251 257
252/* 258/*
253 * Even in DMA/UDMA modes we still use PIO access for IDENTIFY, S.M.A.R.T 259 * Even in DMA/UDMA modes we still use PIO access for IDENTIFY, S.M.A.R.T