diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2006-06-26 09:26:15 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-26 18:58:27 +0200 |
commit | 17c1033d331a430ce631805e15215e63b4cce764 (patch) | |
tree | 3ec734f17ecc4a77116388947e8ee96426ee2d01 /drivers/ide/ide-timing.h | |
parent | [PATCH] ide-io: increase timeout value to allow for slave wakeup (diff) | |
download | linux-17c1033d331a430ce631805e15215e63b4cce764.tar.xz linux-17c1033d331a430ce631805e15215e63b4cce764.zip |
[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/ide-timing.h')
-rw-r--r-- | drivers/ide/ide-timing.h | 8 |
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 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_t *drive, short speed, struct ide_timing * 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 |