From 9f201a03fda6d773d93f383ea6aa166b59ceaa27 Mon Sep 17 00:00:00 2001 From: Jassi Brar Date: Fri, 14 Jan 2011 11:55:53 +0900 Subject: [PATCH] --- yaml --- r: 235291 b: refs/heads/master c: 553fbcde3481c98a076c9744a59ad08dbc61c099 h: refs/heads/master i: 235289: 4d541481b09c7065e6b1ff06890101a146a65faf 235287: c161e07751b08a98172b2a1ef21dc50aac1ac217 v: v3 --- [refs] | 2 +- trunk/drivers/usb/gadget/epautoconf.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index be57ffc020ed..6f1fab84d32f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7af75af2424c3a866041e7981d91f01f93235533 +refs/heads/master: 553fbcde3481c98a076c9744a59ad08dbc61c099 diff --git a/trunk/drivers/usb/gadget/epautoconf.c b/trunk/drivers/usb/gadget/epautoconf.c index 8a832488ccdd..9b7360ff5aa7 100644 --- a/trunk/drivers/usb/gadget/epautoconf.c +++ b/trunk/drivers/usb/gadget/epautoconf.c @@ -128,6 +128,13 @@ ep_matches ( } } + /* + * If the protocol driver hasn't yet decided on wMaxPacketSize + * and wants to know the maximum possible, provide the info. + */ + if (desc->wMaxPacketSize == 0) + desc->wMaxPacketSize = cpu_to_le16(ep->maxpacket); + /* endpoint maxpacket size is an input parameter, except for bulk * where it's an output parameter representing the full speed limit. * the usb spec fixes high speed bulk maxpacket at 512 bytes.