Re: [PATCH ht6560b] Force prefetch for some devices

2008-02-18 Thread Sergei Shtylyov

Hello.

Jan Evert van Grootheest wrote:


Prefetch needs to be set for some ide devices to work when connected to


   Prefetch bit seems to mean 1=disable, 0=enable despite what the datasheet 
says...



a ht6560b interface. This was not always done properly, causing a system
with a HD and CD on the primary interface to not work properly. Or, in
effect, hang hard.



This patch forces prefetch on devices before checking whether it
is necessary to change the settings in the interface



This patch should also be applied to 2.4. I don't currently have a
2.4 tree around.



(also change my email address)



Signed-off-by: Jan Evert van Grootheest [EMAIL PROTECTED]


   Please send the patch to the current 2.4 maintainer, after applying it to 
the 2.4 tree which you can download on kernel.org.





--- linux-2.6.git/drivers/ide/legacy/ht6560b.c  2008-02-01 18:50:31.0 
+0100
+++ linux-2.6.24/drivers/ide/legacy/ht6560b.c   2008-02-18 13:48:59.0 
+0100
@@ -23,18 +23,21 @@
  *  Prefetch mode bit OFF for ide disks and
  *  ON for anything else.
  *
+ *  Version 0.08Need to force prefetch for CDs and other non-disk
+ *  devices. (not sure which devices exactly need
+ *  prefetch)
  *


   Hard disks only ai guess, i.e. non-ATAPI device.

MBR, Sergei
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH ht6560b] Force prefetch for some devices

2008-02-18 Thread Alan Cox
On Mon, 18 Feb 2008 13:50:02 +0100
Jan Evert van Grootheest [EMAIL PROTECTED] wrote:

 Prefetch needs to be set for some ide devices to work when connected to
 a ht6560b interface. This was not always done properly, causing a system
 with a HD and CD on the primary interface to not work properly. Or, in
 effect, hang hard.
 
 This patch forces prefetch on devices before checking whether it
 is necessary to change the settings in the interface

Interesting, that is backwards to the docs and not something I've seen.
If you are correct then pata_legacy also wants tweaking .

Alan
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH ht6560b] Force prefetch for some devices

2008-02-18 Thread Jan Evert van Grootheest

Alan,

Alan Cox wrote:

On Mon, 18 Feb 2008 13:50:02 +0100
Jan Evert van Grootheest [EMAIL PROTECTED] wrote:

  

Prefetch needs to be set for some ide devices to work when connected to
a ht6560b interface. This was not always done properly, causing a system
with a HD and CD on the primary interface to not work properly. Or, in
effect, hang hard.

This patch forces prefetch on devices before checking whether it
is necessary to change the settings in the interface



Interesting, that is backwards to the docs and not something I've seen.
  
Hum, I may have an incorrect understanding of the prefetch bit or 
misread the code.
But for sure that patch makes my 486 boot (HD as primary master and CD 
as primary slave).


From testing I know that the HD works with and without prefetch (it's 
1.15M/s without prefetch, ~950k/s with). And the boot hangs (as in 
powerbutton required) if prefetch is not set for the CD.

For reference, the generic IDE driver is ~850k/s.

If you are correct then pata_legacy also wants tweaking .

Alan
  
I think, but didn't look real good nor test yet, that pata_legacy also 
needs something comparable to select_proc? Or is that implemented in 
some generic manner?

Depending on the day job, I could get to testing that somewhere this week.

-- Jan Evert

-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH ht6560b] Force prefetch for some devices

2008-02-18 Thread Alan Cox
 I think, but didn't look real good nor test yet, that pata_legacy also 
 needs something comparable to select_proc? Or is that implemented in 
 some generic manner?

It sets it in the timing routine:
pata_legacy:ht6560b_set_piomode

-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH ht6560b] Force prefetch for some devices

2008-02-18 Thread Bartlomiej Zolnierkiewicz
On Monday 18 February 2008, Jan Evert van Grootheest wrote:
 Prefetch needs to be set for some ide devices to work when connected to
 a ht6560b interface. This was not always done properly, causing a system
 with a HD and CD on the primary interface to not work properly. Or, in
 effect, hang hard.
 
 This patch forces prefetch on devices before checking whether it
 is necessary to change the settings in the interface
 
 This patch should also be applied to 2.4. I don't currently have a
 2.4 tree around.
 
 (also change my email address)
 
 Signed-off-by: Jan Evert van Grootheest [EMAIL PROTECTED]

I applied it as it is but could I ask you to follow up on the following
(rather minor) issues:

- According to observations from your testing and comments from Sergei/Alan
  it really seems that prefetch bit has reversed meaning so the driver should
  be updated to reflect it.

- Could the old changelog be removed while we are at it?  The detailed
  changelog is kept in the kernel git tree nowadays.

Thanks,
Bart
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html