WSL2-Linux-Kernel/drivers/usb
Xu Yang d4ef3c9c79 usb: ehci: add workaround for chipidea PORTSC.PEC bug
[ Upstream commit dda4b60ed7 ]

Some NXP processor using chipidea IP has a bug when frame babble is
detected.

As per 4.15.1.1.1 Serial Bus Babble:
  A babble condition also exists if IN transaction is in progress at
High-speed SOF2 point. This is called frame babble. The host controller
must disable the port to which the frame babble is detected.

The USB controller has disabled the port (PE cleared) and has asserted
USBERRINT when frame babble is detected, but PEC is not asserted.
Therefore, the SW isn't aware that port has been disabled. Then the
SW keeps sending packets to this port, but all of the transfers will
fail.

This workaround will firstly assert PCD by SW when USBERRINT is detected
and then judge whether port change has really occurred or not by polling
roothub status. Because the PEC doesn't get asserted in our case, this
patch will also assert it by SW when specific conditions are satisfied.

Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Acked-by: Peter Chen <peter.chen@kernel.org>
Link: https://lore.kernel.org/r/20230809024432.535160-1-xu.yang_2@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-23 11:09:59 +02:00
..
atm
c67x00
cdns3 usb: cdns3: Put the cdns set active part outside the spin lock 2023-09-23 11:09:59 +02:00
chipidea usb: chipidea: imx: improve logic if samsung,picophy-* parameter is 0 2023-09-06 21:28:38 +01:00
class
common usb: common: usb-conn-gpio: Prevent bailing out if initial role is none 2023-08-16 18:21:59 +02:00
core USB: core: Fix oversight in SuperSpeed initialization 2023-09-19 12:22:53 +02:00
dwc2 usb: dwc2: Fix some error handling paths 2023-07-23 13:47:21 +02:00
dwc3 usb: dwc3: meson-g12a: do post init to fix broken usb after resumption 2023-09-06 21:28:38 +01:00
early
gadget usb: gadget: fsl_qe_udc: validate endpoint index for ch9 udc 2023-09-23 11:09:59 +02:00
host usb: ehci: add workaround for chipidea PORTSC.PEC bug 2023-09-23 11:09:59 +02:00
image
isp1760
misc
mon
mtu3
musb Revert "usb: common: usb-conn-gpio: Set last role to unknown before initial detection" 2023-07-23 13:47:25 +02:00
phy usb: phy: mxs: fix getting wrong state with mxs_phy_is_otg_host() 2023-09-19 12:22:44 +02:00
renesas_usbhs
roles Revert "usb: common: usb-conn-gpio: Set last role to unknown before initial detection" 2023-07-23 13:47:25 +02:00
serial USB: serial: option: add FOXCONN T99W368/T99W373 product 2023-09-06 21:28:38 +01:00
storage usb-storage: alauda: Fix uninit-value in alauda_check_media() 2023-08-16 18:21:59 +02:00
typec usb: typec: bus: verify partner exists in typec_altmode_attention 2023-09-19 12:22:53 +02:00
usbip
Kconfig
Makefile
usb-skeleton.c