ide-timing.h: make the timing from the IDE device work
PATCH 1/1 ide-timing.h: make the timing from the IDE device work
ide-timing.h patch: make the timing from the IDE device work.
Albert Lee
--- linux-2.6.6\drivers\ide\ide-timing.h.ori 2004-05-10 10:32:28.000000000 +0800
+++ linux-2.6.6\drivers\ide\ide-timing.h 2004-08-19 13:01:17.117860800 +0800 @@ -220,6 +220,7 @@
if (!(s = ide_timing_find_mode(speed)))
return -EINVAL;
+ memcpy(t, s, sizeof(*t));
/*
* If the drive is an EIDE drive, it can tell us it needs extended
* PIO/MWDMA cycle timing.
@@ -248,7 +249,7 @@
* 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
Quoted 3 lines · Albert Lee
ide-timing.hpatch: make the timing from the IDE device work.Albert Lee
Bartolomiej, we indeed need this patch, otherwise EIDE timings the drive supplies to us are completely ignored in the code.
Quoted 21 lines
--- linux-2.6.6\drivers\ide\ide-timing.h.ori 2004-05-10 10:32:28.000000000 +0800
+++ linux-2.6.6\drivers\ide\ide-timing.h 2004-08-19 13:01:17.117860800 +0800(quoted diff) +2
-1@@ -220,6 +220,7 @@ if (!(s = ide_timing_find_mode(speed))) return -EINVAL; + memcpy(t, s, sizeof(*t)); /* * If the drive is an EIDE drive, it can tell us it needs extended * PIO/MWDMA cycle timing.@@ -248,7 +249,7 @@ * 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
Signature · 2 lines
Vojtech Pavlik SuSE Labs, SuSE CR
Quoted 9 lines
Bartolomiej, we indeed need this patch, otherwise EIDE timings the drive supplies to us are completely ignored in the code.
Signature · 2 lines
Vojtech Pavlik SuSE Labs, SuSE CR
Sorry the previous patch seems in incorrect format.
Resubmit it here.
Change:
- Make the timings supplied by the IDE device work
Albert
--------------------------------------------------------------------------------------------------
drivers/ide/ide-timing.h 2005-02-14 18:40:57.000000000 +0800 renamed from drivers/ide/ide-timing.h 2005-02-14 16:26:37.000000000 +0800 +2 -1
@@ -220,6 +220,7 @@ if (!(s = ide_timing_find_mode(speed))) return -EINVAL; + memcpy(t, s, sizeof(*t)); /* * If the drive is an EIDE drive, it can tell us it needs extended * PIO/MWDMA cycle timing.
@@ -248,7 +249,7 @@ * 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
drivers/ide/ide-timing.h +2 -1
@@ -220,6 +220,7 @@if (!(s =ide_timing_find_mode (speed)))return -EINVAL ; +memcpy (t, s,sizeof (*t));/* * If the drive is an EIDE drive, it can tell us it needs extended * PIO/MWDMA cycle timing.
@@ -248,7 +249,7 @@* 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