diff options
author | Manu Gautam <mgautam@codeaurora.org> | 2017-07-19 17:07:10 +0530 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2017-08-03 12:30:51 +0300 |
commit | 40d829fb2ec636b6b4b0cc95e2546ab9aca04cc9 (patch) | |
tree | cbdf9a9bdf397799f220aa14e59438bdb6164a2e /security | |
parent | 16f73eb02d7e1765ccab3d2018e0bd98eb93d973 (diff) | |
download | linux-40d829fb2ec636b6b4b0cc95e2546ab9aca04cc9.tar.bz2 |
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>
Diffstat (limited to 'security')
0 files changed, 0 insertions, 0 deletions