From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) (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 194A73E5566 for ; Tue, 14 Apr 2026 12:05:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776168334; cv=none; b=Z5h0K3Kjw+qjvZfRFahJ2NrR5ILSZyRgAT79hq7sMKzozedU4lBKZ2OkJAL4YVltSeyVghqcks3kR+IMFGRej7TQ4hSXTWrIQANGDHewlk9oxyaUHde1dPL+5EL7k/bQDSGuxec1TMdothi3/BniyXlMcErtGlPXD5YdHp1B4M8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776168334; c=relaxed/simple; bh=tLbh6Dtabtd0bULDfZQM4nBsiH734PBHEQmrg6Ik+TI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:From:In-Reply-To: Content-Type:References; b=La1rPCbtnk4//HxFn8nnMr3q4ovF8pFLIc7eX9JHNS1O85OC76KwGtEsWuAQ7+lj/zxaoYtBJViKlMgNxZUrfX2LW3fygsnllzwYSF6FzDZM8wwae3xXDhKq/fRbkelNCdPVmXxTkRKIDqfDFt74nyGXrK5gprDUTiE21lxz0Os= 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=V9M9iO9W; arc=none smtp.client-ip=203.254.224.34 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="V9M9iO9W" Received: from epcas5p4.samsung.com (unknown [182.195.41.42]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20260414120522epoutp04dcdd57c585985455385fb8f831d326e3~mN620Ai2Q2668926689epoutp04n for ; Tue, 14 Apr 2026 12:05:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20260414120522epoutp04dcdd57c585985455385fb8f831d326e3~mN620Ai2Q2668926689epoutp04n DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1776168322; bh=7LMcgHYoyDKjt5p7XcIwEBqvkpHrB91lMgYwqIJMSQ0=; h=Date:Subject:To:Cc:From:In-Reply-To:References:From; b=V9M9iO9WPKYIqqr5YCkcks27w9d9cSmBZyqhCYFR/JFT+WKSH82dfP0XBUGdCULLk K5+89rPy7wNRQ3QKH1V470GcgJu9To84UpN3bUi9HUzhNYETHEON/kvMTtQRgWeTwX lHVcUQcHVIDsrL80dP+T0bABKk9X7M0RSyZWpSUQ= Received: from epsnrtp03.localdomain (unknown [182.195.42.155]) by epcas5p4.samsung.com (KnoxPortal) with ESMTPS id 20260414120521epcas5p4dac48d96a4988f18a449c074669c7025~mN62RRFAK2879428794epcas5p4Z; Tue, 14 Apr 2026 12:05:21 +0000 (GMT) Received: from epcas5p2.samsung.com (unknown [182.195.38.94]) by epsnrtp03.localdomain (Postfix) with ESMTP id 4fw2z46Nq5z3hhT3; Tue, 14 Apr 2026 12:05:20 +0000 (GMT) Received: from epsmtip2.samsung.com (unknown [182.195.34.31]) by epcas5p1.samsung.com (KnoxPortal) with ESMTPA id 20260414120520epcas5p1af40edf6f26de616e19cbc98174f63ae~mN61HBdF60316703167epcas5p1k; Tue, 14 Apr 2026 12:05:20 +0000 (GMT) Received: from [107.122.5.126] (unknown [107.122.5.126]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20260414120518epsmtip2d6510d55c1caec1d3e6193ef60fd3418~mN6zHDeJT0669906699epsmtip27; Tue, 14 Apr 2026 12:05:18 +0000 (GMT) Message-ID: Date: Tue, 14 Apr 2026 17:35:16 +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: <20260414010532.sxciijnzak3ldw35@synopsys.com> Content-Transfer-Encoding: 7bit X-CMS-MailID: 20260414120520epcas5p1af40edf6f26de616e19cbc98174f63ae 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> 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? Thanks, Selva > >> Move the GUID register programming to occur after the core soft reset >> has completed to ensure the value 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