UPSTREAM: usb: dwc2: host: Support immediate retries for split transactions
authorDouglas Anderson <dianders@chromium.org>
Wed, 11 Nov 2015 18:33:52 +0000 (10:33 -0800)
committerHuang, Tao <huangtao@rock-chips.com>
Tue, 3 Jan 2017 09:50:53 +0000 (17:50 +0800)
commit5a514c08f31ed1a2f6978beb9fc5d2c929a753d2
tree0c7a85d095b7ad6b29280dab235d97595ef43547
parent0ed2976a586c34a85cab3e01856ea46eef9e6a55
UPSTREAM: usb: dwc2: host: Support immediate retries for split transactions

In some cases, like when you've got a "Microsoft Wireless Keyboard 2000"
connected to dwc2 with a hub, expected that we'll get some transfer
errors sometimes.  The controller is expected to try at least 3 times
before giving up.  See figure "Figure A-67. Normal HS CSPLIT 3 Strikes
Smash" in the USB spec.

The dwc2 controller has a way to support this by using the "EC_MC"
field.  The Raspberry Pi driver has logic for setting this right.  See
fiq_fsm_queue_split_transaction() in their "dwc_otg_hcd.c".  Let's use
the same logic.

After making this change, we no longer get dropped characters from the
above mentioned keyboard.  Other devices on the same bus as the keyboard
also behave more properly.

Thanks for Julius Werner for the expert analysis and suggestions.

Change-Id: I2351f95a0c6db1ca24c54edce574c42e073b7211
Acked-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
(cherry picked from commit 69b76cdff592058ea445cd40e18c75dffaba4cb9)
drivers/usb/dwc2/core.c