Skip to content

Commit

Permalink
[PATCH] USB: g_ether, highspeed conformance fix
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Brownell authored and Greg Kroah-Hartman committed Apr 14, 2006
1 parent 8b52490 commit e1394b4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/usb/gadget/ether.c
Original file line number Diff line number Diff line change
Expand Up @@ -2338,6 +2338,9 @@ eth_bind (struct usb_gadget *gadget)
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;
Expand All @@ -2361,9 +2364,6 @@ eth_bind (struct usb_gadget *gadget)
#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;
Expand Down

0 comments on commit e1394b4

Please sign in to comment.