From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 31841606A322 for ; Fri, 4 Dec 2026 03:22:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=riYGd09K; dkim=fail reason="signature verification failed" (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=LWgU2C13 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding: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-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=urVPdUWUelW/kGN6rmdWhk7wJAjtPXQHdLV8M2qjoa0=; b=riYGd09KXNGG/kJcxOuGnbHEJd YDS6XsM66yNdk6Qrbcl2XxeD93doPDGtJxzuBg5s0ykzFhLVpG2i/5xaSw4hvxpDgisRC2bnG319h HGNTNyTWsDqvKcmubc2PF+1bTjidljkZuRCabJJfEHS9ZKgPiBvGAMSDsx+IV5/82vom8t3akE43/ 6Fn83DliqDU8nnIIURTYTKTfo1I+N3Zy5cvF+i76ewuaXjjhNOCnr8+NKCQT65O3fKUJow5voLYCE ozQ8PIEVsatOtHjk7Uq4GZkHmcdGcglUGrWsTKIR6yGGTt6IwzdjF82HTvHtmiDdwwWIGO7MNI9l8 7LEs+L/A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZJsI-0000000GWDe-2LRE; Fri, 04 Dec 2026 03:22:18 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZJsC-0000000GWCH-41sM; Fri, 04 Dec 2026 03:22:16 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 7FF614414D; Fri, 4 Dec 2026 03:22:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 14B9B1F000CE; Fri, 4 Dec 2026 03:22:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796354532; bh=8h5x4XydBmC4yWPcqRdUciuWmuriYXJLN2lRcdVByyo=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=LWgU2C13DnSRlSTwRPsMrnIJ8RAhjjrv7vz6p8MoGZFBS+QrbRwL4NuqGAvGZBswP jNIzf5qdXXe8CRIbvFtF33h2t7nEqEIx13lJ/XEyqjL6mP8YvRqLQ0P0ynH8yTVBGe +4fNl0sGryM4MO9F48nO6yMQFeufZnp0cGxUKSVs= Date: Thu, 3 Dec 2026 17:48:53 +0100 From: Greg Kroah-Hartman To: Sebastian Reichel Cc: Thinh Nguyen , Heiko Stuebner , Vinod Koul , Neil Armstrong , Manivannan Sadhasivam , Manivannan Sadhasivam , Krishna Kurapati , Chaoyi Chen , Igor Paunovic , Alexey Charkov , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-phy@lists.infradead.org, kernel@collabora.com Subject: Re: [PATCH v19 5/6] usb: dwc3: core: only access GUSB3PIPECTL under lock Message-ID: <2026120340-designing-playroom-0d07@gregkh> References: <20261114-b4-rockchip-dwc3-rockchip-glue-v19-0-b79fb5f4b42a@collabora.com> <20261114-b4-rockchip-dwc3-rockchip-glue-v19-5-b79fb5f4b42a@collabora.com> X-Archived-By: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20261114-b4-rockchip-dwc3-rockchip-glue-v19-5-b79fb5f4b42a@collabora.com> X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DATE_IN_PAST_06_12, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Sat, Nov 14, 2026 at 02:02:04AM +0100, Sebastian Reichel wrote: > Update dwc3_enable_susphy() to take dwc->lock while updating > GUSB3PIPECTL to protect the read-modify-write cycle from other users > accessing the same register, which is soon introduced. > > Note: technically there is already dwc3_ss_phy_setup() as a second user, > but it runs and finishes before any call to dwc3_enable_susphy() should > happen. > > Signed-off-by: Sebastian Reichel > --- > drivers/usb/dwc3/core.c | 19 +++++++++++++++---- > drivers/usb/dwc3/glue.h | 2 +- > 2 files changed, 16 insertions(+), 5 deletions(-) > > diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c > index daf5aec07fbf..0cb1b33a7c98 100644 > --- a/drivers/usb/dwc3/core.c > +++ b/drivers/usb/dwc3/core.c > @@ -108,11 +108,13 @@ static int dwc3_get_dr_mode(struct dwc3 *dwc) > return 0; > } > > -void dwc3_enable_susphy(struct dwc3 *dwc, bool enable) > +static void __dwc3_enable_susphy(struct dwc3 *dwc, bool enable) > { > u32 reg; > int i; > > + lockdep_assert_held(&dwc->lock); Can't you also use __must_hold()? _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip