The backport commit to 5.15 branch: 9d4f84a15f9c9727bc07f59d9dafc89e65aadb34 "arm64: dts: imx8mp: Add snps,gfladj-refclk-lpm-sel quirk to USB nodes" (from upstream commit 5c3d5ecf48ab06c709c012bf1e8f0c91e1fcd7ad) switched from "snps,dis-u2-freeclk-exists-quirk" to "snps,gfladj-refclk-lpm-sel-quirk". The problem is that the gfladj-refclk-lpm-sel-quirk quirk is not implemented / backported to 5.15 branch. This commit should be either reverted, or the commit introducing gfladj-refclk-lpm-sel-quirk needs to be merged to 5.15 kernel branch. As a result of this patch, on Gateworks Venice GW7400 revB board the USB 3.x devices which are connected to the USB Type C port does not enumerate and the following errors are generated: [ 14.906302] xhci-hcd xhci-hcd.0.auto: Timeout while waiting for setup device command [ 15.122383] usb 2-1: device not accepting address 2, error -62 [ 25.282195] xhci-hcd xhci-hcd.0.auto: Abort failed to stop command ring: -110 [ 25.297408] xhci-hcd xhci-hcd.0.auto: xHCI host controller not responding, assume dead [ 25.305345] xhci-hcd xhci-hcd.0.auto: HC died; cleaning up [ 25.311058] xhci-hcd xhci-hcd.0.auto: Timeout while waiting for stop endpoint command [ 25.334361] usb usb2-port1: couldn't allocate usb_device When the commit is reverted the USB 3.x drives works fine.
Created attachment 304637 [details] dmesg with USB 3.2 stick inserted
Created attachment 304638 [details] dmesg with usb 2.0 stick inserted
The USB 2.0 devices are properly enumerated. Only USB 3.x devices are affected in our configuration.
On Fri, Jul 14, 2023 at 01:18:29PM +0000, bugzilla-daemon@kernel.org wrote: > https://bugzilla.kernel.org/show_bug.cgi?id=217670 > > Bug ID: 217670 > Summary: Regression in USB DWC3 driver in kernel 5.15 branch > Product: Drivers > Version: 2.5 > Hardware: ARM > OS: Linux > Status: NEW > Severity: normal > Priority: P3 > Component: USB > Assignee: drivers_usb@kernel-bugs.kernel.org > Reporter: tomasz.rostanski@thalesgroup.com > Regression: No > > The backport commit to 5.15 branch: > 9d4f84a15f9c9727bc07f59d9dafc89e65aadb34 "arm64: dts: imx8mp: Add > snps,gfladj-refclk-lpm-sel quirk to USB nodes" (from upstream commit > 5c3d5ecf48ab06c709c012bf1e8f0c91e1fcd7ad) > switched from "snps,dis-u2-freeclk-exists-quirk" to > "snps,gfladj-refclk-lpm-sel-quirk". > > The problem is that the gfladj-refclk-lpm-sel-quirk quirk is not implemented > / > backported to 5.15 branch. > > This commit should be either reverted, or the commit introducing > gfladj-refclk-lpm-sel-quirk needs to be merged to 5.15 kernel branch. What commit exactly needs to be backported? thanks, greg k-h
I believe the missing commit is: commit a6fc2f1b092787e9d7dbe472d720cede81680315 Author: Alexander Stein <alexander.stein@ew.tq-group.com> Date: Thu Sep 15 08:28:53 2022 +0200 usb: dwc3: core: add gfladj_refclk_lpm_sel quirk This selects the SOF/ITP counter be running on ref_clk. As documented U2_FREECLK_EXISTS has to be set to 0 as well. Reviewed-by: Li Jun <jun.li@nxp.com> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> Link: https://lore.kernel.org/r/20220915062855.751881-3-alexander.stein@ew.tq-group.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The commit a6fc2f1b092787e9d7dbe472d720cede81680315 has dependencies of previous commits, so at the minimum the following commits needs to be backported: 7bee318838890 usb: dwc3: reference clock period configuration a5ae3cbe9dfcc usb: dwc3: Get clocks individually 5114c3ee24875 usb: dwc3: Calculate REFCLKPER based on reference clock 596c87856e08d usb: dwc3: Program GFLADJ a6fc2f1b09278 usb: dwc3: core: add gfladj_refclk_lpm_sel quirk
On Mon, Jul 17, 2023 at 06:36:08AM +0000, bugzilla-daemon@kernel.org wrote: > https://bugzilla.kernel.org/show_bug.cgi?id=217670 > > --- Comment #6 from Tomasz Rostanski (tomasz.rostanski@thalesgroup.com) --- > The commit a6fc2f1b092787e9d7dbe472d720cede81680315 has dependencies of > previous commits, so at the minimum the following commits needs to be > backported: > > 7bee318838890 usb: dwc3: reference clock period configuration > a5ae3cbe9dfcc usb: dwc3: Get clocks individually > 5114c3ee24875 usb: dwc3: Calculate REFCLKPER based on reference clock > 596c87856e08d usb: dwc3: Program GFLADJ > a6fc2f1b09278 usb: dwc3: core: add gfladj_refclk_lpm_sel quirk Can you test this to verify that it does actually work for you? thanks, greg k-h
I confirm. It works for me.
(In reply to Tomasz Rostanski from comment #8) >>> 7bee318838890 usb: dwc3: reference clock period configuration >>> a5ae3cbe9dfcc usb: dwc3: Get clocks individually >>> 5114c3ee24875 usb: dwc3: Calculate REFCLKPER based on reference clock >>> 596c87856e08d usb: dwc3: Program GFLADJ >>> a6fc2f1b09278 usb: dwc3: core: add gfladj_refclk_lpm_sel quirk >> >> Can you test this to verify that it does actually work for you? >> thanks, >> >> greg k-h > > I confirm. It works for me. Tomasz, was a fix ever merged to 5.15.y – either a revert or the changes listed above? Doesn't look like it from here, but I have the strong suspicion that I'm missing something here.
No it's not fixed in 5.15.y.
Greg, guess it fell through the cracks on your side then. You afaics intended to apply these to 5.15.y to fix the regression that was caused by backporting 5c3d5ecf48a ("arm64: dts: imx8mp: Add snps,gfladj-refclk-lpm-sel quirk to USB nodes") [v6.1-rc1] to 5.15.y: >>> 7bee318838890 usb: dwc3: reference clock period configuration >>> a5ae3cbe9dfcc usb: dwc3: Get clocks individually >>> 5114c3ee24875 usb: dwc3: Calculate REFCLKPER based on reference clock >>> 596c87856e08d usb: dwc3: Program GFLADJ >>> a6fc2f1b09278 usb: dwc3: core: add gfladj_refclk_lpm_sel quirk Thomas confirmed that they fix the regression here: https://bugzilla.kernel.org/show_bug.cgi?id=217670#c8
On Thu, Aug 31, 2023 at 09:31:51AM +0000, bugzilla-daemon@kernel.org wrote: > https://bugzilla.kernel.org/show_bug.cgi?id=217670 > > --- Comment #11 from The Linux kernel's regression tracker (Thorsten > Leemhuis) (regressions@leemhuis.info) --- > Greg, guess it fell through the cracks on your side then. You afaics intended > to apply these to 5.15.y to fix the regression that was caused by backporting > 5c3d5ecf48a ("arm64: dts: imx8mp: Add snps,gfladj-refclk-lpm-sel quirk to USB > nodes") [v6.1-rc1] to 5.15.y: > > >>> 7bee318838890 usb: dwc3: reference clock period configuration > >>> a5ae3cbe9dfcc usb: dwc3: Get clocks individually > >>> 5114c3ee24875 usb: dwc3: Calculate REFCLKPER based on reference clock > >>> 596c87856e08d usb: dwc3: Program GFLADJ > >>> a6fc2f1b09278 usb: dwc3: core: add gfladj_refclk_lpm_sel quirk > > Thomas confirmed that they fix the regression here: > https://bugzilla.kernel.org/show_bug.cgi?id=217670#c8 Those ids do not match up properly. Can we please take this to email on the stable@vger.kernel.org list? I thought we resolved this there already, if not, I need a real list of ids, in the correct order, to apply please. thanks, greg k-h
Tomasz, can you do what Greg asked for? It seems the commits you listed in comment 6 do not apply cleanly any more (I just checked), so you are in the best position to help here, as something might have changed since your comment 6 and 8.
Created attachment 305003 [details] 0001-usb-dwc3-reference-clock-period-configuration.patch
Created attachment 305004 [details] 0002-usb-dwc3-Get-clocks-individually.patch
Created attachment 305005 [details] 0003-usb-dwc3-Calculate-REFCLKPER-based-on-reference-cloc.patch
Created attachment 305006 [details] 0004-usb-dwc3-Program-GFLADJ.patch
Created attachment 305007 [details] 0005-usb-dwc3-core-add-gfladj_refclk_lpm_sel-quirk.patch
Created attachment 305008 [details] 0001-usb-dwc3-reference-clock-period-configuration.patch
Created attachment 305009 [details] 0002-usb-dwc3-Get-clocks-individually.patch
Created attachment 305010 [details] 0003-usb-dwc3-Calculate-REFCLKPER-based-on-reference-cloc.patch
Created attachment 305011 [details] 0004-usb-dwc3-Program-GFLADJ.patch
Created attachment 305012 [details] 0005-usb-dwc3-core-add-gfladj_refclk_lpm_sel-quirk.patch
I have attached rebased patches against 5.15.129: 0001-usb-dwc3-reference-clock-period-configuration.patch 0002-usb-dwc3-Get-clocks-individually.patch 0003-usb-dwc3-Calculate-REFCLKPER-based-on-reference-cloc.patch 0004-usb-dwc3-Program-GFLADJ.patch 0005-usb-dwc3-core-add-gfladj_refclk_lpm_sel-quirk.patch apply with git am.
That won't fly, bugzilla is not used like that by the kernel developers (and the changelog is lost afaics, which is a no-go, too). Please submit them as outline in https://www.kernel.org/doc/html/next/process/stable-kernel-rules.html (you likely need option 3 in case the patches need to be adjusted for the 5.15.y branch, otherwise option 2 would do the trick)
On Fri, Sep 01, 2023 at 12:57:47PM +0000, bugzilla-daemon@kernel.org wrote: > https://bugzilla.kernel.org/show_bug.cgi?id=217670 > > --- Comment #24 from Tomasz Rostanski (tomasz.rostanski@thalesgroup.com) --- > I have attached rebased patches against 5.15.129: > 0001-usb-dwc3-reference-clock-period-configuration.patch > 0002-usb-dwc3-Get-clocks-individually.patch > 0003-usb-dwc3-Calculate-REFCLKPER-based-on-reference-cloc.patch > 0004-usb-dwc3-Program-GFLADJ.patch > 0005-usb-dwc3-core-add-gfladj_refclk_lpm_sel-quirk.patch > apply with git am. <formletter> This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read: https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html for how to do this properly. </formletter>