On Sun, 7 Mar 2010 17:24:07 +0100 Christopher Zimmermann
<madro...@zakweb.de> wrote:

> Hi,
> 
> I get a complete lock-up while booting during initialisation of my 
> SIS7002 EHCI controller.
> 
> When enabling USB2.0 support, but disabling 'legacy' mode everything 
> is fine. I just can't use my usb keyboard to talk to the boot> prompt.
> 
> When I enable legacy mode, but set USB2.0 to 'FullSpeed' I just get 
> this:
> 
> ehci0: timed out waiting for BIOS
> 
> I had a look at the source, but don't really get it whether this is 
> bad. I could not find corresponding code in the Linux kernel.
> It seems to be about handing over the host controler to the OS after 
> the bios used it for 'legacy' mode. Why is this only needed for 
> USB2.0? I thought my keyboard and mouse were USB1.0 devices!?
> 
> When I enable legacy mode and set USB2.0 to 'HighSpeed' I get the 
> above message and the kernel locks up completely.
> I added some DPRINTF()s to the relevant sections. (See below)
> The strange thing is that the last thing the kernel prints out is
> 
> ehci: before loop
> 
> so the kernel manages to do the printf, but doesn't manage to do the 
> funtion call to usb_delay_ms and another printf.
> Now I had a look at the linux ehci driver, because with knoppix I
> have no problems using USB2.0. You can find the corresponding section
> of the linux driver below.
> The linux kernel protects itself by "write-locking" the call to 
> ehci_writel, but I have no clue what this means and no clue how to 
> achieve this in OpenBSD. The call to down_write() seems to lock a 
> semaphore. Any help to fix this is appreciated.
> 
> 
> Christopher
> 
> 
> P.S.
> 
> Another interesting observation: When removing my AGB graphics
> adaptor and using the onboard graphics chip I have no problems with
> USB at all.
> 

The x86 BIOS sucks to begin with, and worse, the use of various terms
is highly inconsistent... In other words, take this with a grain of
salt, if not a whole shaker of salt, tequila and a lime.

When you enable "Legacy Mode" in the BIOS of many systems, you're
actually telling the system to find and use the keyboard and mouse on
serial ports (includng PS/2 and similar ports). Of course, this means
if you're actually using USB based keyboard/mouse and you've turned on
"Legacy Mode", you've just made a real mess. --The system believes it
does not have a keyboard or mouse attached because it does not find
them where you told it to find them (serial).

Is the kernel locked up? --Possibly No. The kernel may be ignoring the
USB mouse/keyboard that you specifically told the bios to ignore by
turning on "Legacy Mode." When the BIOS tells the kernel that it has no
mouse or keyboard installed, then the kernel thinks, "Ah, we're running
headless," and adjusts accordingly.

        jcr

Reply via email to