Linux-Rockchip Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Reichel <sebastian.reichel@collabora.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
	 Heiko Stuebner <heiko@sntech.de>, Vinod Koul <vkoul@kernel.org>,
	 Neil Armstrong <neil.armstrong@linaro.org>,
	Manivannan Sadhasivam <mani@kernel.org>,
	 Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>,
	Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>,
	 Chaoyi Chen <chaoyi.chen@rock-chips.com>,
	Igor Paunovic <royalnet026@gmail.com>,
	 Alexey Charkov <alchark@flipper.net>,
	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
Date: Fri, 4 Dec 2026 17:59:12 +0100	[thread overview]
Message-ID: <axLsanr0m83u7uEd@venus> (raw)
In-Reply-To: <2026120340-designing-playroom-0d07@gregkh>


[-- Attachment #1.1: Type: text/plain, Size: 1861 bytes --]

Hello Greg,

On Thu, Dec 03, 2026 at 05:48:53PM +0100, Greg Kroah-Hartman wrote:
> 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 <sebastian.reichel@collabora.com>
> > ---
> >  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()?

That sure works and looks quite sensible to me. As this is the only
feedback for the v19, would it be okay to send that as follow-up?

The merge window comes close and I would love to see this series
landing in v7.5. It ensures USB-C keeps working on recent Rockchip
SoCs when the cable is hotplugged in opposite direction (which is
broken with upstream since USB support got introduced for the
platform) and unblocks further fixes on the PHY side as well as
USB-C DP AltMode DRM series at the same time.

Greetings,

-- Sebastian

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

  reply	other threads:[~2026-12-04 17:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-14  1:01 [PATCH v19 0/6] usb: dwc3: introduce Rockchip glue driver Sebastian Reichel
2026-11-14  1:02 ` [PATCH v19 1/6] phy: rockchip: usbdp: Track PHY power state Sebastian Reichel
2026-11-14  1:02 ` [PATCH v19 2/6] phy: rockchip: usbdp: Add reset hook support for dwc3 Sebastian Reichel
2026-11-14  1:02 ` [PATCH v19 3/6] usb: dwc3: rockchip: introduce glue driver Sebastian Reichel
2026-12-04 18:27   ` Thinh Nguyen
2026-11-14  1:02 ` [PATCH v19 4/6] usb: dwc3: core: add post PHY registration hook for platform glue Sebastian Reichel
2026-11-14  1:02 ` [PATCH v19 5/6] usb: dwc3: core: only access GUSB3PIPECTL under lock Sebastian Reichel
2026-12-03 16:48   ` Greg Kroah-Hartman
2026-12-04 16:59     ` Sebastian Reichel [this message]
2026-12-04 19:04       ` Thinh Nguyen
2026-11-14  1:02 ` [PATCH v19 6/6] usb: dwc3: rockchip: add USBDP PHY reset quirk Sebastian Reichel
2026-12-04 18:52   ` Thinh Nguyen
2026-11-21 11:37 ` [PATCH v19 0/6] usb: dwc3: introduce Rockchip glue driver Ricardo Pardini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=axLsanr0m83u7uEd@venus \
    --to=sebastian.reichel@collabora.com \
    --cc=Thinh.Nguyen@synopsys.com \
    --cc=alchark@flipper.net \
    --cc=chaoyi.chen@rock-chips.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heiko@sntech.de \
    --cc=kernel@collabora.com \
    --cc=krishna.kurapati@oss.qualcomm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mani@kernel.org \
    --cc=manivannan.sadhasivam@oss.qualcomm.com \
    --cc=neil.armstrong@linaro.org \
    --cc=royalnet026@gmail.com \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox