From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) (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 EBBB23921E4 for ; Wed, 15 Apr 2026 06:53:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.24 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776236027; cv=none; b=gny8/chI+8hSYT49ML2GgA5qQlmkBqOoSzSjte6xU/ImJUhUzKU0ACy7kgRjGs0YAtcy+vgeEwLtbK4ab/VVVSIc4xz+VVpkPg3OUYqxfEwJXpFx7aklWI56xF7UAfoJwdXyKLCK2H3nbR3kw+VNHLgp556lvx3EpAT2Asl3yJ8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776236027; c=relaxed/simple; bh=h06io7gcIU78lOPpiwU/zAiBmWgRW7eARf65dBcgVI8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:From:In-Reply-To: Content-Type:References; b=ggc1scragC59ZTmBNC8qj3vA55VTAgQFZemycUUvafKymhfsD4+sOYvllWNToXjDJ5gW7h2kAxanWdxfkd2iopnYKg5sSrbCOn0sx77p6NGZ+8zwCfgRGgWT34RVlQ3QhalfHuWGl4M2ENFRdqZRZLO/OWBrmhcAvRlWA3oHm6s= 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=ceDU4Daj; arc=none smtp.client-ip=203.254.224.24 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="ceDU4Daj" Received: from epcas5p1.samsung.com (unknown [182.195.41.39]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20260415065336epoutp018d442fe56a885c4af30e987d1c88bce0~mdT8FKD3R0752107521epoutp01R for ; Wed, 15 Apr 2026 06:53:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20260415065336epoutp018d442fe56a885c4af30e987d1c88bce0~mdT8FKD3R0752107521epoutp01R DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1776236016; bh=A2Oe+K6G+so/eNF7+ZZwIvrKnrLwucXjD0QcuG1eQEs=; h=Date:Subject:To:Cc:From:In-Reply-To:References:From; b=ceDU4DajGDypaXxcPwkaRQaj5Pc+xvQ4HdZ7TkWqhbsPFKnPDSpYgZTgNqspQ2vxo 1W5zl4gVzOo1lFA30Ydex0Mpren4gOWwhBpxuJToivwDQ6AzSMkujhpXGMJhsfuWGg rgIdurnX3W1ABjnRolt/SiINeibUsG1TCm0H/7WM= Received: from epsnrtp01.localdomain (unknown [182.195.42.153]) by epcas5p1.samsung.com (KnoxPortal) with ESMTPS id 20260415065335epcas5p1921d6dbdf504c8df78b9d53d2cf52023~mdT7YQFHv1005610056epcas5p1C; Wed, 15 Apr 2026 06:53:35 +0000 (GMT) Received: from epcas5p3.samsung.com (unknown [182.195.38.89]) by epsnrtp01.localdomain (Postfix) with ESMTP id 4fwX0t4pwXz6B9m6; Wed, 15 Apr 2026 06:53:34 +0000 (GMT) Received: from epsmtip1.samsung.com (unknown [182.195.34.30]) by epcas5p3.samsung.com (KnoxPortal) with ESMTPA id 20260415065334epcas5p3ccec0106ebbf98ae036feab1b762bf9a~mdT52vxcV1892218922epcas5p3Z; Wed, 15 Apr 2026 06:53:34 +0000 (GMT) Received: from [107.122.5.126] (unknown [107.122.5.126]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20260415065331epsmtip1ab8cbeb56395313abb9076b4a268a4c1~mdT3kVRLg0303303033epsmtip1d; Wed, 15 Apr 2026 06:53:31 +0000 (GMT) Message-ID: <242b06d2-7785-4728-8286-ff79a8dfaaa6@samsung.com> Date: Wed, 15 Apr 2026 12:23:29 +0530 Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] usb: dwc3: Fix GUID register programming order To: Thinh Nguyen Cc: "gregkh@linuxfoundation.org" , "paulz@synopsys.com" , "balbi@ti.com" , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "jh0801.jung@samsung.com" , "akash.m5@samsung.com" , "h10.kim@samsung.com" , "alim.akhtar@samsung.com" , "thiagu.r@samsung.com" , "muhammed.ali@samsung.com" , "stable@vger.kernel.org" , Pritam Manohar Sutar Content-Language: en-US From: Selvarasu Ganesan In-Reply-To: <20260415014620.mjmlt6w3ttlzosr3@synopsys.com> Content-Transfer-Encoding: 8bit X-CMS-MailID: 20260415065334epcas5p3ccec0106ebbf98ae036feab1b762bf9a 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: 20260410070245epcas5p49355581dcb9f629641c9914ce4ce80ec References: <20260410064735.515-1-selvarasu.g@samsung.com> <20260414010532.sxciijnzak3ldw35@synopsys.com> <20260415014620.mjmlt6w3ttlzosr3@synopsys.com> On 4/15/2026 7:16 AM, Thinh Nguyen wrote: > On Tue, Apr 14, 2026, Selvarasu Ganesan wrote: >> On 4/14/2026 6:35 AM, Thinh Nguyen wrote: >>> On Fri, Apr 10, 2026, Selvarasu Ganesan wrote: >>>> The Linux Version Code is currently written to the GUID register before >>>> dwc3_core_soft_reset() is executed. Since the core soft reset clears the >>>> GUID register back to its default value, the version information is >>>> subsequently lost. >>> This is not right. Soft reset should not clear the GUID register. >>> Something else must have cleared it. Did you assert Vcc reset (hard >>> reset) during phy reset/initialization? >>> >>> BR, >>> Thinh >> Hi Thinh, >> >> Thank you for the clarification. Yes, you are correct, this issue is not >> related to a dwc3 core soft reset. Instead, the GUID value reverts to >> its default state when the PHY link_sw_reset completes during PHY init >> sequence. >> >> We are using the Synopsys eUSB PHY, this reset is triggered from our >> downstream driver during the PHY init sequence (invoked through >> |dwc3_core_init|). >> >> Could you please suggest the best way to retrieve the correct linux >> version information from the GUID? >> Additionally, would it be feasible to update the GUID register after the >> PHY init sequence (triggered by |dwc3_core_init|) completes? >> > Yes. Just fix up the changelog to properly describe the problem and > solution. > > BR, > Thinh Hi Thinh, Thanks for the confirmation. I have modified the changelog as shown below, please review it once then i will post updated patchset. From: Selvarasu Ganesan Date: Thu, 9 Apr 2026 18:34:03 +0530 Subject: [PATCH v2] usb: dwc3: Move GUID programming after PHY initialization 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..8b9e9d3e9589a 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; @@ -1374,6 +1368,12 @@ int dwc3_core_init(struct dwc3 *dwc)         if (ret)                 goto err_exit_ulpi; +       /* +        * 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_core_soft_reset(dwc);         if (ret)                 goto err_exit_phy; -- 2.34.1 Thanks, Selva