Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: dwc3: Support quirk for writing high-low order

There's the limitation of Synopsys dwc3 controller with ERST programming in
supporting separate ERSTBA_HI and ERSTBA_LO programming. It's supported when
the ERSTBA is programmed ERSTBA_HI before ERSTBA_LO. But, writing operations
in xHCI is done low-high order following xHCI spec. xHCI specification 5.1
"Register Conventions" states that 64 bit registers should be written in
low-high order. Synopsys dwc3 needs workaround for high-low order. That's why
adding new quirk is needed to support this.

Signed-off-by: Daehwan Jung <dh10.jung@samsung.com>
Link: https://lore.kernel.org/r/1718019553-111939-2-git-send-email-dh10.jung@samsung.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Daehwan Jung and committed by
Greg Kroah-Hartman
b7ec7fd6 2bc0bea1

+3 -1
+3 -1
drivers/usb/dwc3/host.c
··· 126 126 127 127 int dwc3_host_init(struct dwc3 *dwc) 128 128 { 129 - struct property_entry props[5]; 129 + struct property_entry props[6]; 130 130 struct platform_device *xhci; 131 131 int ret, irq; 132 132 int prop_idx = 0; ··· 161 161 memset(props, 0, sizeof(struct property_entry) * ARRAY_SIZE(props)); 162 162 163 163 props[prop_idx++] = PROPERTY_ENTRY_BOOL("xhci-sg-trb-cache-size-quirk"); 164 + 165 + props[prop_idx++] = PROPERTY_ENTRY_BOOL("write-64-hi-lo-quirk"); 164 166 165 167 if (dwc->usb3_lpm_capable) 166 168 props[prop_idx++] = PROPERTY_ENTRY_BOOL("usb3-lpm-capable");