mbox series

[v3,0/2] usb: dwc3: Add a quirk to set GUCTL.SPRSCTRLTRANSEN bit

Message ID 20211230135832.23005-1-akingchen@vivo.com
Headers show
Series usb: dwc3: Add a quirk to set GUCTL.SPRSCTRLTRANSEN bit | expand

Message

Yaqin Pan Dec. 30, 2021, 1:58 p.m. UTC
Hi,

Sorry for the late reply.

Changes in v3:
modify Documentation/devicetree/bindings/usb/snps,dwc3.yaml
because the errors in dt-binding check.

Changes in v2:
modify Documentation/devicetree/bindings/usb/snps,dwc3.yaml

Yaqin Pan (2):
  usb: dwc3: Add a quirk to set GUCTL.SPRSCTRLTRANSEN bit.
  dt-bindings: usb: document snps,sprs-ctrl-trans-quirk property in dwc3

 Documentation/devicetree/bindings/usb/snps,dwc3.yaml | 6 ++++++
 drivers/usb/dwc3/core.c                              | 4 ++++
 drivers/usb/dwc3/core.h                              | 3 +++
 3 files changed, 13 insertions(+)

Comments

Yaqin Pan Dec. 30, 2021, 1:58 p.m. UTC | #1
This quirk is only for dwc3 host mode.
the dwc3 controller can't emurate some devices successfully.
For example, TF card reader (aaaa:8816):
failed log
usb 1-1: new high-speed USB device number 2 using xhci-hcd
usb 1-1: device descriptor read/all, error -110
Greg Kroah-Hartman Dec. 30, 2021, 2:12 p.m. UTC | #2
On Thu, Dec 30, 2021 at 09:58:30PM +0800, Yaqin Pan wrote:
> This quirk is only for dwc3 host mode.
> the dwc3 controller can't emurate some devices successfully.
> For example, TF card reader (aaaa:8816):
> failed log
> usb 1-1: new high-speed USB device number 2 using xhci-hcd
> usb 1-1: device descriptor read/all, error -110
> >From the usb analyzer, always return NAK in the data phase.
> if enable the GUCTL.SPRSCTRLTRANSEN bit. then the log is:
> usb 2-1: new high-speed USB device number 3 using xhci-hcd
> usb 2-1: New USB device found, idVendor=aaaa,
> idProduct=8816, bcdDevice=13.08
> usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
> usb 2-1: Product: MXT USB Device
> usb 2-1: Manufacturer: MXTronics
> usb 2-1: SerialNumber: 150101v01
> usb 2-1: New USB device found, VID=aaaa, PID=8816
> 
> Some devices are slow in responding to Control transfers.
> Scheduling mulitiple transactions in one microframe/frame
> can cause the devices to misbehave. if this qurik is enabled,
> the host controller schedules transations for a Control transfer
> in defferent microframes/frame.

If this is needed for all devices (i.e. you do not know what device is
going to be plugged in), why not just enable it for all controllers?
Why whould you NOT want this enabled?

Or is this a broken hardware device and only specific host controllers
need this?  If so, how do we know which ones need this set and which do
not?

thanks,

greg k-h