Skip to content

Commit d784865

Browse files
selvarasu-ggregkh
authored andcommitted
usb: dwc3: Move GUID programming after PHY initialization
[ Upstream commit aad35f9 ] The Linux Version Code is currently written to the GUID register before PHY initialization. Certain PHY implementations (such as Synopsys eUSB PHY performing link_sw_reset) clear the GUID register to its default value during initialization, causing the kernel version information to be lost. Move the GUID register programming to occur after PHY initialization completes to ensure the Linux version information persists. Fixes: fa0ea13 ("usb: dwc3: core: write LINUX_VERSION_CODE to our GUID register") Cc: stable <stable@kernel.org> Reported-by: Pritam Manohar Sutar <pritam.sutar@samsung.com> Signed-off-by: Selvarasu Ganesan <selvarasu.g@samsung.com> Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://patch.msgid.link/20260417063314.2359-1-selvarasu.g@samsung.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 476ee63 commit d784865

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

drivers/usb/dwc3/core.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1339,12 +1339,6 @@ static int dwc3_core_init(struct dwc3 *dwc)
13391339

13401340
hw_mode = DWC3_GHWPARAMS0_MODE(dwc->hwparams.hwparams0);
13411341

1342-
/*
1343-
* Write Linux Version Code to our GUID register so it's easy to figure
1344-
* out which kernel version a bug was found.
1345-
*/
1346-
dwc3_writel(dwc, DWC3_GUID, LINUX_VERSION_CODE);
1347-
13481342
ret = dwc3_phy_setup(dwc);
13491343
if (ret)
13501344
return ret;
@@ -1376,6 +1370,12 @@ static int dwc3_core_init(struct dwc3 *dwc)
13761370
if (ret)
13771371
goto err_exit_phy;
13781372

1373+
/*
1374+
* Write Linux Version Code to our GUID register so it's easy to figure
1375+
* out which kernel version a bug was found.
1376+
*/
1377+
dwc3_writel(dwc, DWC3_GUID, LINUX_VERSION_CODE);
1378+
13791379
dwc3_core_setup_global_control(dwc);
13801380
dwc3_core_num_eps(dwc);
13811381

0 commit comments

Comments
 (0)