]> git.baikalelectronics.ru Git - kernel.git/commit
usb: dwc3: gadget: make to increment req->remaining in all cases
authorFelipe Balbi <felipe.balbi@linux.intel.com>
Wed, 8 Mar 2017 11:56:37 +0000 (13:56 +0200)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Wed, 8 Mar 2017 11:56:37 +0000 (13:56 +0200)
commit12b69f0c4c0d3e81177b9153fa95bd08991cbfbf
tree5697eef95418403861b2eb4f5e7b54534c1a6a60
parent6188b97282eabb9fef186716944beacb75a676bd
usb: dwc3: gadget: make to increment req->remaining in all cases

Sometimes, we might get a completion for a TRB which is left with HWO
bit. Even in these cases, we should increment req->remaining to
properly report total transferred size. I noticed this while debuggin
a separate problem seen with MSC tests from USBCV. Sometimes we would
erroneously report a completion for a 512-byte transfer when, in
reality, we transferred 0 bytes.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc3/gadget.c