UPSTREAM: usb: dwc2: host: If using uframe scheduler, end splits better
authorDouglas Anderson <dianders@chromium.org>
Fri, 29 Jan 2016 02:20:13 +0000 (18:20 -0800)
committerHuang, Tao <huangtao@rock-chips.com>
Tue, 3 Jan 2017 10:48:25 +0000 (18:48 +0800)
commita9ce138f79922984131d6947fa5d2a8d7839f353
tree8042458d8401569dcf851b4b694751b020c98de7
parentfebc1a5eda8af34db765d57375f1968933e876d8
UPSTREAM: usb: dwc2: host: If using uframe scheduler, end splits better

The microframe scheduler figured out exactly how many transfers we need
for a split transaction.  Let's use this knowledge to know when to end
things.

Without this I found that certain devices would just keep responding
with tons of NYET resonses on their INT_IN endpoint.  These would just
keep going and going and eventually we'd decide to terminate the
transfer (because the whole frame changed), but by that time the
scheduler would decide that we "missed" the start of the next transfer.
I can also imagine that if we blow past the end of our scheduled time we
may mess up other things that were scheduled to happen.

No known test cases are improved by this patch except that the scheduler
code doesn't yell about MISSES constantly anymore.

Change-Id: I743b8b121a3c41fdec33b463318f816654aa2bba
Acked-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
(cherry picked from commit 1479cb698ac07d5dc4cc2b7de3588d38484267e9)
drivers/usb/dwc2/hcd_intr.c