diff options
author | Kishon Vijay Abraham I <kishon@ti.com> | 2015-02-23 18:40:17 +0530 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2015-04-14 05:48:11 +0200 |
commit | 04afd5b59b2edcb0bd035f126bdbe27c31782772 (patch) | |
tree | d9f0e79579037342c0281c6c4ce48079f3c62100 /drivers/usb/gadget/ether.c | |
parent | 5b9ce0e28a5262ff7b8fca98b888669881174bf9 (diff) | |
download | u-boot-04afd5b59b2edcb0bd035f126bdbe27c31782772.tar.gz u-boot-04afd5b59b2edcb0bd035f126bdbe27c31782772.tar.xz u-boot-04afd5b59b2edcb0bd035f126bdbe27c31782772.zip |
usb: gadget: defer setting maxpacket till ->setup()
Taken from linux kernel with commit
commit 765f5b830e547229bb752e7b232ee83e2b3d49d5
Author: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Thu Jun 23 14:26:11 2011 +0200
usb: gadget: defer setting maxpacket till ->setup()
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
Diffstat (limited to 'drivers/usb/gadget/ether.c')
-rw-r--r-- | drivers/usb/gadget/ether.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index 8f03a6bb9d..1b0e766a94 100644 --- a/drivers/usb/gadget/ether.c +++ b/drivers/usb/gadget/ether.c @@ -1248,6 +1248,7 @@ eth_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) switch (wValue >> 8) { case USB_DT_DEVICE: + device_desc.bMaxPacketSize0 = gadget->ep0->maxpacket; value = min(wLength, (u16) sizeof device_desc); memcpy(req->buf, &device_desc, value); break; @@ -2132,7 +2133,6 @@ autoconf_fail: hs_subset_descriptors(); } - device_desc.bMaxPacketSize0 = gadget->ep0->maxpacket; usb_gadget_set_selfpowered(gadget); /* For now RNDIS is always a second config */ |