linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Actually honor drive's minimum PIO/DMA cycle times
@ 2006-04-25 22:40 Sergei Shtylyov
  0 siblings, 0 replies; only message in thread
From: Sergei Shtylyov @ 2006-04-25 22:40 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Bartlomiej Zolnierkiewicz, linux-ide

[-- Attachment #1: Type: text/plain, Size: 453 bytes --]

Hello.

    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.

MBR, Sergei


[-- Attachment #2: IDE-actually-honor-min-cycle-time.patch --]
[-- Type: text/plain, Size: 671 bytes --]

diff --git a/drivers/ide/ide-timing.h b/drivers/ide/ide-timing.h
index 2fcfac6..c0864b1 100644
--- a/drivers/ide/ide-timing.h
+++ b/drivers/ide/ide-timing.h
@@ -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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2006-04-25 22:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-25 22:40 [PATCH] Actually honor drive's minimum PIO/DMA cycle times Sergei Shtylyov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).