path: root/Documentation
diff options
authorLadislav Michl <>2018-10-24 22:41:47 +0200
committerSascha Hauer <>2018-10-29 11:26:35 +0100
commiteb188069f36a1250d5b2b668ae589e73256135d9 (patch)
tree2bbe839161ec4637e95e67715e724c82de8dd6af /Documentation
parent28b38c1804d761257397f41ae2bbc071cd009935 (diff)
usb: gadget: set maxpacket_limit
Gadget update to 3.15 imported Linux patch e117e742d310 ("usb: gadget: add "maxpacket_limit" field to struct usb_ep"): This patch adds "maxpacket_limit" to struct usb_ep. This field contains maximum value of maxpacket supported by driver, and is set in driver probe. This value should be used by autoconfig() function, because value of field "maxpacket" is set to value from endpoint descriptor when endpoint becomes enabled. So when autoconfig() function will be called again for this endpoint, "maxpacket" value will contain wMaxPacketSize from descriptior instead of maximum packet size for this endpoint. For this reason this patch adds new field "maxpacket_limit" which contains value of maximum packet size (which defines maximum endpoint capabilities). This value is used in ep_matches() function used by autoconfig(). Value of "maxpacket_limit" should be set in UDC driver probe function, using usb_ep_set_maxpacket_limit() function, defined in gadget.h. This function set choosen value to both "maxpacket_limit" and "maxpacket" fields. However said update didn't bring in all driver changes. Do it now. Fixes: 2776d53d7ac8 ("USB: gadget: Update to 3.15") Signed-off-by: Ladislav Michl <> Signed-off-by: Sascha Hauer <>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions