android_kernel_motorola_sm6375/drivers/usb
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ajay Agarwal 12658022a9 usb: dwc3: gadget: Bail out for short packets/ZLPs only if IOC is not set
Currently the driver explicitly clears the HWO bit of the TRB
prepared for short packet or ZLP for EPs in both the directions,
and returns with non-zero code which breaks cleanup of completed
requests. The driver does this because it is written with the
understanding that the HW does not clear HWO for such packets.
But the databook section 4.2.3.2 says that the HW does not clear
HWO for such packets on the OUT EP only.

Now consider a device-to-host(USB IN) usecase like SW NCM, where
the u_ether driver looks for interrupt on every 5th request(say).
In between these 5 requests, if there is any packet of multiple
of MPS, then ZLP TRB will also be prepared. When the event is
received for the 5th request, we will only handle upto the ZLP
TRB because of the faulty logic described above. And only on the
event for the 10th request, we handle the 5th request (because of
IOC set on the 5th request). So, clearly the TRB cleanup logic is
lagging behind the HW actually completing the requests. When this
mismatch happens multiple times, there eventually comes a time
when the SW does not have any free requests anymore and hence
stall will be seen.

Fix this by returning with non-zero code only if the IOC bit is
set for the short packet or ZLP TRB, so that the cleanup routine
continues upto the TRB for which the event was raised.

Change-Id: I984e6de383993fc3c2da6b74147d6f50e081de34
Signed-off-by: Ajay Agarwal <[email protected]>
2021-02-28 06:18:59 -08:00
..
atm
c67x00
cdns3
chipidea
class
common
core Merge "usb: core: Reduce resume signalling time for devices behind external hub" 2021-01-22 13:46:44 -08:00
dwc2
dwc3 usb: dwc3: gadget: Bail out for short packets/ZLPs only if IOC is not set 2021-02-28 06:18:59 -08:00
early
gadget Merge "usb: f_gsi: Clean up low memory buffer size/depth definitions" 2021-02-26 06:40:49 -08:00
host Merge android11-5.4.61+ (364ec3d) into msm-5.4 2021-02-23 18:05:00 +05:30
image
isp1760
misc usb: misc: Add support for test modes via external hub 2021-01-03 22:58:25 +05:30
mon
mtu3
musb
pd usb: pd: Clear send_get_status flag in protocol reset 2020-09-04 03:52:05 -07:00
phy Merge "usb: phy: qusb: Use scm call to update LVL_SHIFTER register" 2021-02-07 11:45:26 -08:00
renesas_usbhs
roles
serial Revert "ANDROID: Revert: Merge 5.4.60 into android11-5.4" 2020-08-23 13:12:51 +02:00
storage
typec Merge "usb: typec: ucsi: Notify USB role switch only if partner supports USB data" 2021-02-25 11:46:49 -08:00
usbip
Kconfig usb: pd: Add support of qpnp-pdphy and policy_engine drivers 2020-08-26 14:56:06 +05:30
Makefile usb: pd: Add support of qpnp-pdphy and policy_engine drivers 2020-08-26 14:56:06 +05:30
usb-skeleton.c