linux/drivers/usb/dwc3
Manu Gautam 40d829fb2e usb: dwc3: gadget: Correct ISOC DATA PIDs for short packets
The PIDs for Isochronous data transfers are incorrect
for high bandwidth IN endpoints when the request length
is less than EP wMaxPacketSize.

As per spec correct PIDs for ISOC data transfers are:

1) For request length <= maxpacket
	- DATA0,

2) For maxpacket < length <= (2 * maxpacket)
	- DATA1, DATA0

3) For (2 * maxpacket) <  length <= (3 * maxpacket)
	- DATA2, DATA1, DATA0.

But driver always sets PCM fields based on wMaxPacketSize
due to which DATA2 happens even for small requests.

Fix this by setting the PCM field of trb->size depending
on request length rather than fixing it to the value
depending on wMaxPacketSize.

Ideally it shouldn't give any issues as dwc3 will send
0-length packet for next IN token if host sends (even
after receiving a short packet). Windows seems to ignore
this but with MacOS frame loss observed when using f_uvc.

Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2017-08-03 12:30:51 +03:00
..
core.c usb: dwc3: core: Call dwc3_core_get_phy() before initializing phys 2017-07-17 10:58:56 +03:00
core.h usb: dwc3: update documentation 2017-06-02 11:22:27 +03:00
debug.h usb: dwc3: trace: decode ctrl request 2017-06-02 11:22:29 +03:00
debugfs.c usb: dwc3: debugfs: slightly improve output of trb_ring 2017-06-02 11:22:28 +03:00
drd.c usb: dwc3: Add dual-role support 2017-04-11 10:58:31 +03:00
dwc3-exynos.c usb: dwc3: exynos: Handle return value of clk_prepare_enable 2017-06-15 11:10:27 +03:00
dwc3-keystone.c usb: dwc3: keystone: check return value 2017-05-16 14:11:04 +03:00
dwc3-of-simple.c usb: dwc3: of-simple: add compatible for Cavium 2016-09-13 09:28:59 +03:00
dwc3-omap.c usb: dwc3: omap: remove IRQ_NOAUTOEN used with shared irq 2017-07-17 10:59:31 +03:00
dwc3-pci.c PM / core: Drop run_wake flag from struct dev_pm_info 2017-06-28 01:52:52 +02:00
dwc3-st.c usb: dwc3: replace %p with %pK 2017-06-02 11:22:10 +03:00
ep0.c usb: dwc3: ep0: make sure wValue is 0 on GetStatus() 2017-06-13 13:21:05 +03:00
gadget.c usb: dwc3: gadget: Correct ISOC DATA PIDs for short packets 2017-08-03 12:30:51 +03:00
gadget.h usb: dwc3: update documentation 2017-06-02 11:22:27 +03:00
host.c usb: dwc3: host: pass quirk-broken-port-ped property for known broken revisions 2017-01-26 11:17:37 +02:00
io.h usb: dwc3: trace: add a proper tracepoint for reg accessors 2016-11-03 10:38:30 +02:00
Kconfig usb: changes for v4.12 2017-04-11 16:47:26 +02:00
Makefile usb: dwc3: Add dual-role support 2017-04-11 10:58:31 +03:00
trace.c usb: dwc3: add tracepoints to aid debugging 2014-09-05 09:55:51 -05:00
trace.h usb: dwc3: trace: decode ctrl request 2017-06-02 11:22:29 +03:00
ulpi.c usb: dwc3: ulpi: conditionally resume ULPI PHY 2017-06-13 13:21:05 +03:00