]> git.baikalelectronics.ru Git - kernel.git/commit
usb: dwc3: gadget: Set maxpacket size for ep0 IN
authorThinh Nguyen <Thinh.Nguyen@synopsys.com>
Sat, 13 Jan 2018 02:18:05 +0000 (18:18 -0800)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 12 Feb 2018 08:48:36 +0000 (10:48 +0200)
commit592465059a3f3283717608928aa4ec4de184490c
treed389b6ed956fa400e9d6be03f9ff10bb3947ccf2
parent8d3efb80ff9538610f4ce6f1b63396fa6b8e9b05
usb: dwc3: gadget: Set maxpacket size for ep0 IN

There are 2 control endpoint structures for DWC3. However, the driver
only updates the OUT direction control endpoint structure during
ConnectDone event. DWC3 driver needs to update the endpoint max packet
size for control IN endpoint as well. If the max packet size is not
properly set, then the driver will incorrectly calculate the data
transfer size and fail to send ZLP for HS/FS 3-stage control read
transfer.

The fix is simply to update the max packet size for the ep0 IN direction
during ConnectDone event.

Cc: stable@vger.kernel.org
Fixes: 1e90ce98e30b ("usb: Introduce DesignWare USB3 DRD Driver")
Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc3/gadget.c