Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e1394b49 authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman
Browse files

[PATCH] USB: g_ether, highspeed conformance fix



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: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 8b524901
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -2338,6 +2338,9 @@ autoconf_fail:
		hs_subset_descriptors();
		hs_subset_descriptors();
	}
	}


	device_desc.bMaxPacketSize0 = gadget->ep0->maxpacket;
	usb_gadget_set_selfpowered (gadget);

	/* For now RNDIS is always a second config */
	/* For now RNDIS is always a second config */
	if (rndis)
	if (rndis)
		device_desc.bNumConfigurations = 2;
		device_desc.bNumConfigurations = 2;
@@ -2361,9 +2364,6 @@ autoconf_fail:
#endif
#endif
#endif	/* DUALSPEED */
#endif	/* DUALSPEED */


	device_desc.bMaxPacketSize0 = gadget->ep0->maxpacket;
	usb_gadget_set_selfpowered (gadget);

	if (gadget->is_otg) {
	if (gadget->is_otg) {
		otg_descriptor.bmAttributes |= USB_OTG_HNP,
		otg_descriptor.bmAttributes |= USB_OTG_HNP,
		eth_config.bmAttributes |= USB_CONFIG_ATT_WAKEUP;
		eth_config.bmAttributes |= USB_CONFIG_ATT_WAKEUP;