public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* RE: [linux-usb-devel] [PATCH] proper bios handoff in ehci-hcd
@ 2004-07-13 20:52 Stuart_Hayes
  2004-07-13 21:56 ` Pete Zaitcev
  0 siblings, 1 reply; 15+ messages in thread
From: Stuart_Hayes @ 2004-07-13 20:52 UTC (permalink / raw)
  To: whbeers, david-b; +Cc: olh, Gary_Lerhaupt, linux-usb-devel, linux-kernel

Will Beers wrote:
>  > though maybe 500 msec is too short a period to wait.
>  > See if 5000 msec helps.
> 
> I went all the way up to 20000 msec and it still didn't help.  I'm
> sure it's a bad idea, but removing that whole if-block below it makes
> it work (which is effectively what switching the and/or did).  I
> don't know enough about it to judge whether it's correct, but what
> exactly is it checking for there?    
> 
> -Will

Without the patch, Linux would just ignore the BIOS handoff--Linux was
writing "0" to the bit that it was supposed to wait for the BIOS to
clear, so it never waited for the BIOS to let go of the controller.

I bet you have a bad BIOS that won't hand off, but I would try the other
thing David suggested--change the write to a byte write.  It seems
unlikely, but, since Linux is writing a "1" to the "BIOS owns the
controller" bit right now, you might be hitting something like this, if
the system is breaking up the write into multiple smaller writes:

the "OS wants the controller" bit is getting written to 1 (first part of
the Linux write, which the system broke into pieces)
the system BIOS (SMI handler) sees that bit set to 1, and clears the
"BIOS owns" bit
the "BIOS owns" bit is getting written back to a 1 (the second part of
the Linux write)
Linux waits in vain for BIOS to clear the "BIOS owns" bit\

Again, seems unlikely, but worth a try if you're recompiling and
testing.



^ permalink raw reply	[flat|nested] 15+ messages in thread
* [PATCH] proper bios handoff in ehci-hcd
@ 2004-06-14 20:30 Gary_Lerhaupt
  2004-06-15 13:57 ` [linux-usb-devel] " David Brownell
  0 siblings, 1 reply; 15+ messages in thread
From: Gary_Lerhaupt @ 2004-06-14 20:30 UTC (permalink / raw)
  To: linux-usb-devel; +Cc: linux-kernel, Stuart_Hayes

Stuart Hayes here at Dell has identified this or/and mix-up in the ehci-hcd driver.  Because of this, ehci-hcd is not properly released by BIOSes supporting full 2.0 and port behavior can then become erratic.

This is broken in latest 2.4 and 2.6.

Gary Lerhaupt
Dell Linux Development
http://linux.dell.com

--- linux/drivers/usb/host/ehci-hcd.c.orig	2004-06-05 03:12:18.000000000 -0500
+++ linux/drivers/usb/host/ehci-hcd.c	2004-06-05 01:18:51.000000000 -0500
@@ -290,7 +290,7 @@ static int bios_handoff (struct ehci_hcd
 		int msec = 500;
 
 		/* request handoff to OS */
-		cap &= 1 << 24;
+		cap |= 1 << 24;
 		pci_write_config_dword (ehci->hcd.pdev, where, cap);
 
 		/* and wait a while for it to happen */

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2004-08-05 15:59 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-13 20:52 [linux-usb-devel] [PATCH] proper bios handoff in ehci-hcd Stuart_Hayes
2004-07-13 21:56 ` Pete Zaitcev
2004-07-13 23:04   ` David Brownell
2004-07-15  9:37     ` Olaf Hering
2004-08-05 13:39       ` Olaf Hering
2004-08-05 15:49         ` David Brownell
  -- strict thread matches above, loose matches on Subject: below --
2004-06-14 20:30 Gary_Lerhaupt
2004-06-15 13:57 ` [linux-usb-devel] " David Brownell
2004-07-13 18:07   ` Olaf Hering
2004-07-13 20:26     ` David Brownell
2004-07-13 20:44       ` Will Beers
2004-07-13 21:11         ` David Brownell
2004-07-13 21:24           ` Will Beers
2004-07-13 21:35             ` David Brownell
2004-07-13 21:43               ` Will Beers
2004-07-13 21:31           ` Will Beers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox