From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 113E33EDE5D; Tue, 12 May 2026 18:03:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778609031; cv=none; b=n9kdo5QcmZ7fVYoy+gHV01CkMRAQqeDJ/Bpd2DR5FpWRfZrnPllAODOYrjGmz2x37qs/a43FKj6DuFDpQyrHDFU5eUBkdP6V92fJfHsMNmbfD/UAgBH4Vft0ftC+HQjddbEm+yQlHTnoMkuDf+6woe9qXvY5C3o54TBwGpQmMgg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778609031; c=relaxed/simple; bh=5N7DWDH+yHSBG3qJ7LR+Mp9E4PkjolhIMWhGuyOEVc0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UH0yRXmWw8DJ4bKz8yl5l1gywguYfDT/lm+IlQz91SemzrbP8wCamzzDm+N2g/sJ0Lui0AeAhAUKH6606p+wNUx4vLpp9RVd+3It/wWdxn2HPyZvdyVE5iSZv3l9SL+6jYM5oJ3uf6oGXjLYdexRg2iHW0OKfHrtRUQtWbn1Lgg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=XA0bImZL; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="XA0bImZL" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 98267C2BCB0; Tue, 12 May 2026 18:03:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1778609030; bh=5N7DWDH+yHSBG3qJ7LR+Mp9E4PkjolhIMWhGuyOEVc0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XA0bImZL8DxBm5+kcVfrHuS/y7r5ThtdTn3TgFg448lAivmL7kKa4GTe8hMBErDd0 oSiNMYdtAi+CHj0dGpkOGgQc11scttHIooh8s8ecFGy+rmnHD1wGnWXft2CZaYh2jJ UN5KMdapaIpUljPibwDFs3niUNS3g43UwxFBBCQE= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, stable , Pritam Manohar Sutar , Selvarasu Ganesan , Thinh Nguyen Subject: [PATCH 7.0 039/307] usb: dwc3: Move GUID programming after PHY initialization Date: Tue, 12 May 2026 19:37:14 +0200 Message-ID: <20260512173940.949720990@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260512173940.117428952@linuxfoundation.org> References: <20260512173940.117428952@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.0-stable review patch. If anyone has any objections, please let me know. ------------------ From: Selvarasu Ganesan commit aad35f9c926ec220b0742af1ada45666ae667956 upstream. 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: fa0ea13e9f1c ("usb: dwc3: core: write LINUX_VERSION_CODE to our GUID register") Cc: stable Reported-by: Pritam Manohar Sutar Signed-off-by: Selvarasu Ganesan Acked-by: Thinh Nguyen Link: https://patch.msgid.link/20260417063314.2359-1-selvarasu.g@samsung.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman --- drivers/usb/dwc3/core.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -1341,12 +1341,6 @@ int dwc3_core_init(struct dwc3 *dwc) hw_mode = DWC3_GHWPARAMS0_MODE(dwc->hwparams.hwparams0); - /* - * Write Linux Version Code to our GUID register so it's easy to figure - * out which kernel version a bug was found. - */ - dwc3_writel(dwc, DWC3_GUID, LINUX_VERSION_CODE); - ret = dwc3_phy_setup(dwc); if (ret) return ret; @@ -1378,6 +1372,12 @@ int dwc3_core_init(struct dwc3 *dwc) if (ret) goto err_exit_phy; + /* + * Write Linux Version Code to our GUID register so it's easy to figure + * out which kernel version a bug was found. + */ + dwc3_writel(dwc, DWC3_GUID, LINUX_VERSION_CODE); + dwc3_core_setup_global_control(dwc); dwc3_core_num_eps(dwc);