From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0B7B2C55838 for ; Wed, 5 Aug 2026 00:43:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=BZ+BIq91ZpioCn57Buthz81Y2iJeYoFWDlzIpEGCBC8=; b=qaOcj5SHRefe1sxmQIwmnIs9fG sfMZ09YyVPbnFXF8kkOzAt/T089UzzDr4OIOkX+XvJeuOV47EJW78XT8EiIidutbNOE/QZWsfbWFt aVepmrPVhx1X5GDbV7PX9Cl1RPN8ALLWHW4Z7NZlaXVCGNPO8jTyId8NkzlBzt//ZR2F2kc3vr1y3 B4irV7fiq9c5XngSEHy7yjWPIzr8nP039Q7F7F/SaSaCkyUD4UMi+TUfKtHe3lPYlrSKKilajlbnL CpIUzC8F5Ae77GrECyI12R/a0zYezPEbfO08+KnaPYVytX+170n+8kLPHP287BTI6THHfG2fEywKU cbu6FSpw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wrPjY-00000002zt4-2Fwv; Wed, 05 Aug 2026 00:43:48 +0000 Received: from sender4-op-o11.zoho.com ([136.143.188.11]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wrPjW-00000002zrV-1lAb for linux-phy@lists.infradead.org; Wed, 05 Aug 2026 00:43:47 +0000 ARC-Seal: i=1; a=rsa-sha256; t=1785890613; cv=none; d=zohomail.com; s=zohoarc; b=UQHnXoD//Gz2T8zIJBEkeBGLVOAXnVA33BGDBl8dAaTXzPbIAR1o+gQ3aVBLuowKR44uJpmsCMiSQ+ybjdpczh4U+tgnCn4V/mky/LKW/T42FaNmcujJHx9CHZkKoSYA+BaxLJ3j8p5z6pPq5WVqKKRVux9tBPvK7wSM9AWGWFM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1785890613; h=Content-Type:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=kMFxhAvlZbwz04r3OCur+VbCpZgLiP+AVky+d0HJcVc=; b=KQGs0/qIzgwNmpZxuUz3p3GLKZrimd43ui0EtL4+uczdskEeREae1WYvsBDjZtJkvLkIU8NBWarZyenLJBGFvkEmP1tzTdMwlR3rnwB1zkeSpevyfmVEN/ycGUctDm5rtXib5nhdpi934G7C8BGVCP69SIGjkubXjjYez932ovo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=sebastian.reichel@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1785890613; s=zohomail; d=collabora.com; i=sebastian.reichel@collabora.com; h=Date:Date:From:From:To:To:Cc:Cc:Subject:Subject:Message-ID:MIME-Version:Content-Type:In-Reply-To:Message-Id:Reply-To; bh=kMFxhAvlZbwz04r3OCur+VbCpZgLiP+AVky+d0HJcVc=; b=CUcGSUEzavxdYeZiAV2laP8VnF3HD6RkSbGCtYaArWboaWY8l5QacHdfadXkKEsy k8Y+6XyLw2/z6RkBEGPv1/FFdThumXyYMcidpTIgP7AXy+C3Xr+qMD//sUUFi3vHZhi bzxHIfNHlm4wdVjVfxHsQNPatevPNjfXOv+ATiDQ= Received: by mx.zohomail.com with SMTPS id 17858906112431002.6678491356571; Tue, 4 Aug 2026 17:43:31 -0700 (PDT) Received: by venus (Postfix, from userid 1000) id 2306118082F; Wed, 05 Aug 2026 02:43:27 +0200 (CEST) Date: Wed, 5 Aug 2026 02:43:26 +0200 From: Sebastian Reichel To: Thinh Nguyen Cc: Krishna Kurapati , Vinod Koul , Neil Armstrong , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Greg Kroah-Hartman , "linux-phy@lists.infradead.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-msm@vger.kernel.org" , "linux-usb@vger.kernel.org" Subject: Re: [PATCH v5 3/5] phy: snps-eusb2: Set phy type to EUSB2 Message-ID: References: <20260723-eusb2-int-handling-v5-v5-0-f32ea6c1a318@oss.qualcomm.com> <20260723-eusb2-int-handling-v5-v5-3-f32ea6c1a318@oss.qualcomm.com> <49d0e412-4561-4f4f-b00b-b77dc9cf143b@oss.qualcomm.com> MIME-Version: 1.0 In-Reply-To: X-Zoho-Virus-Status: 1 X-Zoho-AV-Stamp: zmail-av-0.2.10.1.5.2/285.885.97 X-ZohoMailClient: External X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260804_174346_570434_D28ED0D6 X-CRM114-Status: GOOD ( 26.79 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============0285703465423744534==" Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org --===============0285703465423744534== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="jcdpp3jngealual5" Content-Disposition: inline --jcdpp3jngealual5 Content-Type: text/plain; protected-headers=v1; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH v5 3/5] phy: snps-eusb2: Set phy type to EUSB2 MIME-Version: 1.0 Hi, On Tue, Aug 04, 2026 at 10:28:53PM +0000, Thinh Nguyen wrote: > On Sun, Jul 26, 2026, Krishna Kurapati wrote: > > On 7/25/2026 3:21 AM, Sebastian Reichel wrote: > > > On Thu, Jul 23, 2026 at 04:09:06PM +0530, Krishna Kurapati wrote: > > > > USB controllers like DWC3 are agnostic of the kind of phy (USB2/eUS= B2) > > > > connected to it. Set the phy type to EUSB2 to let the controller kn= ow > > > > the phy type when queried during its probe. > > > >=20 > > > > Signed-off-by: Krishna Kurapati > > > > --- > > > > drivers/phy/phy-snps-eusb2.c | 4 ++++ > > > > 1 file changed, 4 insertions(+) > > > >=20 > > > > diff --git a/drivers/phy/phy-snps-eusb2.c b/drivers/phy/phy-snps-eu= sb2.c > > > > index f90bf7e95463..e139b17bcda5 100644 > > > > --- a/drivers/phy/phy-snps-eusb2.c > > > > +++ b/drivers/phy/phy-snps-eusb2.c > > > > @@ -13,6 +13,8 @@ > > > > #include > > > > #include > > > > +#include > > > > + > > > > #define EXYNOS_USB_PHY_HS_PHY_CTRL_RST (0x0) > > > > #define USB_PHY_RST_MASK GENMASK(1, 0) > > > > #define UTMI_PORT_RST_MASK GENMASK(5, 4) > > > > @@ -597,6 +599,8 @@ static int snps_eusb2_hsphy_probe(struct platfo= rm_device *pdev) > > > > return PTR_ERR(generic_phy); > > > > } > > > > + phy_set_type(generic_phy, PHY_TYPE_EUSB2); > > >=20 > > > Isn't there a potential race condition if it's handled in this way? > > >=20 > > > 1. phy-snps-eusb2 probe: PHY is registered > > > 2. dwc3 probes > > > 3. phy-snps-eusb2 probe: PHY type is set > > >=20 > >=20 > > How about we do this get_type call after dwc3_probe call during > > dwc3_qcom_probe. That way we can ensure phy is up for sure since core i= nit > > has to happen as part of dwc3_probe. >=20 > There should be no race here. The phy_set_type() is called before the > phy is registered. dwc3-qcom would get -EPROBE_DEFER if it probes before > the phy is registered. Indeed, it was me being stupid. I blame the heat :) Greetings, -- Sebastian --jcdpp3jngealual5 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAmpyhysACgkQ2O7X88g7 +ppYFg/9FOy4dS3z38lF7xVBpJaJQCBs6P4YrVrHM76r5DgrcoqrPbL2bhsEa2X9 drQ6MVLNMTbUFblSmGPrhqc+j2pOnaREhsuvY3oV3uly0V3a98FoZGN/1jw/CPb3 xPeriVcMIsIGYgoUwFYDBBO+Nvg8esnHOl4KtjyqVxaOFdAN8qt0hLfknAtM6iYk ibfblNSnTIql1bo7A/W9CrzWHa8jDPR9awAtZRBKij1hOXf6HkVBrhomZLb7IIdY T3G14//GbWUWBhJsv0Ehzn3GV2Teh4TOT63xcKuM9D7R3r9pUy5K5+3UO3S/xKc4 YnCYyWVWYgqCnblXzg8gl6P+V7iM5fNhxu1Ah3JDWX7xl7YjfoqUd8cPx/zGjmNf jvS98X/M8a/xaQBFVnkRXqhE5B4/YoVN60CcyVL+1QmI8pOmfKcdY0jjsOPp72e1 1FeXYzSeYRwP7gGrIoAsk8Cct6C5GJ/1dAkVnX7UV0MpFDSYE4uHuMmPNSpamXWl Yi5mSdDnsAo5YtpxSRrz/S4YXda3pqRyue/hrtyHnmMdAdllHGak9TQOw5Bk1iJp 5Z+ksKnrzG5SUuDyCoGmPLh6bpcrOyQlc1vdBgScfRhjFW/7PxYZXrvdh06xdT0v hYvCxGHPoSm2rw7YTlUhYXGX9/q3G5bxNk9U0ar5hDFpQ/7Tp48= =pTrD -----END PGP SIGNATURE----- --jcdpp3jngealual5-- --===============0285703465423744534== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy --===============0285703465423744534==--