]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] USB: g_ether, highspeed conformance fix
authorDavid Brownell <david-b@pacbell.net>
Sun, 2 Apr 2006 18:20:43 +0000 (10:20 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 14 Apr 2006 18:12:25 +0000 (11:12 -0700)
Be sure to record the peripheral's ep0 maxpacket size BEFORE using
that to initialize the (high speed) device qualifier; that helps a
lot with USBCV testing.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/ether.c

index c3d8e5c5bf2811a42407c084b0b248c0a9f93874..9c4422ac9de41d25db79c6dfd7c5ddb59ae917aa 100644 (file)
@@ -2338,6 +2338,9 @@ autoconf_fail:
                hs_subset_descriptors();
        }
 
+       device_desc.bMaxPacketSize0 = gadget->ep0->maxpacket;
+       usb_gadget_set_selfpowered (gadget);
+
        /* For now RNDIS is always a second config */
        if (rndis)
                device_desc.bNumConfigurations = 2;
@@ -2361,9 +2364,6 @@ autoconf_fail:
 #endif
 #endif /* DUALSPEED */
 
-       device_desc.bMaxPacketSize0 = gadget->ep0->maxpacket;
-       usb_gadget_set_selfpowered (gadget);
-
        if (gadget->is_otg) {
                otg_descriptor.bmAttributes |= USB_OTG_HNP,
                eth_config.bmAttributes |= USB_CONFIG_ATT_WAKEUP;