USBCV reported that a descriptor field was invalid.

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 <[EMAIL PROTECTED]>

Index: g26/drivers/usb/gadget/ether.c
===================================================================
--- g26.orig/drivers/usb/gadget/ether.c	2006-04-02 11:06:30.000000000 -0700
+++ g26/drivers/usb/gadget/ether.c	2006-04-02 11:17:01.000000000 -0700
@@ -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;

Reply via email to