Current-Users archive

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

Re: CVS commit: src/sys/dev/usb



jakllsch%netbsd.org@localhost said:
> Bus activity shows that Windows will preform a device reset after
> requesting the initial descriptor, and before setting the address.

Yes I know -- while I don't have a bus analyzer I've read it
somewhere.

> As our code is now, we set the address immediately after getting the
> initial descriptor.

It has been that way since Jun 22 2008. My change only modified
the request size which was 8 bytes fixed length before and is 64
bytes with shorter accepted now.
Anyway, does the attached patch change anything for you?
(The reset code in the uhci root hub emulation also doesn't
look that correct btw.)

best regards
Matthias


------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDirig Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
#
# old_revision [05e835aa0eba3516934ac8f55903c1bedc74fe0e]
#
# patch "sys/dev/usb/usb_subr.c"
#  from [87806c52b8fd21a6fb1ca68dd2d5fdfbf062fdd2]
#    to [3c7e5c298e2fc0d883dfa511d0952abad8c71072]
#
============================================================
--- sys/dev/usb/usb_subr.c      87806c52b8fd21a6fb1ca68dd2d5fdfbf062fdd2
+++ sys/dev/usb/usb_subr.c      3c7e5c298e2fc0d883dfa511d0952abad8c71072
@@ -1161,6 +1163,10 @@ usbd_new_device(device_t parent, usbd_bu
                return (err);
        }
 
+       /* Windows resets the port here, do likewise */
+       if (up->parent)
+               usbd_reset_port(up->parent, port, &ps);
+
        if (speed == USB_SPEED_HIGH) {
                /* Max packet size must be 64 (sec 5.5.3). */
                if (dd->bMaxPacketSize != USB_2_MAX_CTRL_PACKET) {


Home | Main Index | Thread Index | Old Index