Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [5.0] USB device ignored on boot




On 20-Jul-09, at 12:15 , Luazi wrote:

I think there is a race condition in the stack. I believe ehci should
initialize before ohci but it does not (on my machine). The comment in
the source suggests the author was aware of this but delayed both ehci
and ohci instead of just ohci.
" ...
        /*
         * In case this controller is a companion controller to an
         * EHCI controller we need to wait until the EHCI controller
         * has grabbed the port.  ....
"

I have included my hack that seems to work for me on 5.0.

The hack works for me too, thank you!
Maybe this can go into the source tree for now?


Index: usr/src/sys/dev/usb/usb.c
===================================================================
--- usr/src/sys/dev/usb/usb.c   (revision 2)
+++ usr/src/sys/dev/usb/usb.c   (working copy)
@@ -367,8 +367,13 @@
        * know how to synchronize the creation of the threads so it
        * will work.
        */
-       usb_delay_ms(sc->sc_bus, 500);
+       if (USBREV_2_0 != sc->sc_bus->usbrev)
+       {
+           /*FIXME: yeah right*/
+           usb_delay_ms(sc->sc_bus, 2000);
+       }

       /* Make sure first discover does something. */
       sc->sc_bus->needs_explore = 1;
       usb_discover(sc);


--
    aew



Home | Main Index | Thread Index | Old Index