From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) (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 26C832D6407 for ; Fri, 17 Apr 2026 06:35:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.33 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776407717; cv=none; b=BTeMxxX+T6ci7SrpWHBGiWqUloCKlFoiIzIonmSdwsLGTvmR+K5CgJQV3VOUC5y53a1ddFmVKnV60ntlSquAKZXAI0z76BjFcunuSoG29EbW9jkzDn1yRAhRXOMWKCZVeBWXx7l1hFEC6sfs0M8OS2uX9MomkvkyABRDjhlPMIs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776407717; c=relaxed/simple; bh=W3f3QPjWzyHt+IqnFm5wz1nKD/zeDiylTNwZCBWCqQI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: References; b=jw8NpexzvGvkZoI5WAN0/yaB3WdSUvoBNq2ojC288eOGJfPdpNo/niDGt+cns4DdcXag2haKaI6Fev2eiKq0HVc3WfEWGk59c6Dgxykg6w79Cgge26a9Vj2NEG6SQ1dOzOT430HZSyakG17vROPTlh1ckA6SVc9U39bfXAE8neY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=ESNzGXNj; arc=none smtp.client-ip=203.254.224.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="ESNzGXNj" Received: from epcas5p1.samsung.com (unknown [182.195.41.39]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20260417063504epoutp03f80a056e7b178ec717923351e7c00816~nEWVI1NR22807228072epoutp03F for ; Fri, 17 Apr 2026 06:35:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20260417063504epoutp03f80a056e7b178ec717923351e7c00816~nEWVI1NR22807228072epoutp03F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1776407704; bh=Lpbhl2216kBv9raG5ut84Dg7CXhWy06hp8E7nL8IRwA=; h=From:To:Cc:Subject:Date:References:From; b=ESNzGXNjmCkk6x/jGml3+04vzkhFaUWsfcTcnMEM8/wlUbA2idZq0xM6yOekFnm5P bYqdk+/08oY/7P5YXYW28cELTjS+m4hUSkndVmnZXjCkqeN9TySsSPsi8eg3PmyrFJ PcW6UMDAjWdo7MI0w1x02Ao3T1tlYTj/DtpDcdSQ= Received: from epsnrtp01.localdomain (unknown [182.195.42.153]) by epcas5p1.samsung.com (KnoxPortal) with ESMTPS id 20260417063504epcas5p18a1807b16f633b8c3085b2b030ffc2d5~nEWUrS6aT2717727177epcas5p1t; Fri, 17 Apr 2026 06:35:04 +0000 (GMT) Received: from epcas5p4.samsung.com (unknown [182.195.38.94]) by epsnrtp01.localdomain (Postfix) with ESMTP id 4fxlVb1dQDz6B9mG; Fri, 17 Apr 2026 06:35:03 +0000 (GMT) Received: from epsmtip1.samsung.com (unknown [182.195.34.30]) by epcas5p4.samsung.com (KnoxPortal) with ESMTPA id 20260417063502epcas5p4f8f7fefb697e6d130ef7e9a78581ed84~nEWTRLC_w1182311823epcas5p45; Fri, 17 Apr 2026 06:35:02 +0000 (GMT) Received: from INBRO002811.samsungds.net (unknown [107.122.5.126]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20260417063456epsmtip1d808da0beed8e4e1ede0b1e3ca08f119~nEWNgGJT90046800468epsmtip1U; Fri, 17 Apr 2026 06:34:56 +0000 (GMT) From: Selvarasu Ganesan To: Thinh.Nguyen@synopsys.com, gregkh@linuxfoundation.org, paulz@synopsys.com, balbi@ti.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Cc: jh0801.jung@samsung.com, akash.m5@samsung.com, h10.kim@samsung.com, alim.akhtar@samsung.com, thiagu.r@samsung.com, muhammed.ali@samsung.com, Selvarasu Ganesan , stable@vger.kernel.org, Pritam Manohar Sutar Subject: [PATCH v2] usb: dwc3: Move GUID programming after PHY initialization Date: Fri, 17 Apr 2026 12:03:11 +0530 Message-ID: <20260417063314.2359-1-selvarasu.g@samsung.com> X-Mailer: git-send-email 2.46.0.windows.1 Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CMS-MailID: 20260417063502epcas5p4f8f7fefb697e6d130ef7e9a78581ed84 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" CMS-TYPE: 105P cpgsPolicy: CPGSC10-542,Y X-CFilter-Loop: Reflected X-CMS-RootMailID: 20260417063502epcas5p4f8f7fefb697e6d130ef7e9a78581ed84 References: 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@vger.kernel.org Reported-by: Pritam Manohar Sutar Signed-off-by: Selvarasu Ganesan --- drivers/usb/dwc3/core.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 161a4d58b2cec..0d3c7e7b2262f 100644 --- 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); -- 2.34.1