From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Sebastian Reichel <sebastian.reichel@collabora.com>
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: Thu, 3 Dec 2026 17:48:53 +0100 [thread overview]
Message-ID: <2026120340-designing-playroom-0d07@gregkh> (raw)
In-Reply-To: <20261114-b4-rockchip-dwc3-rockchip-glue-v19-5-b79fb5f4b42a@collabora.com>
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()?
WARNING: multiple messages have this Message-ID (diff)
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Sebastian Reichel <sebastian.reichel@collabora.com>
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: Thu, 3 Dec 2026 17:48:53 +0100 [thread overview]
Message-ID: <2026120340-designing-playroom-0d07@gregkh> (raw)
In-Reply-To: <20261114-b4-rockchip-dwc3-rockchip-glue-v19-5-b79fb5f4b42a@collabora.com>
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()?
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
WARNING: multiple messages have this Message-ID (diff)
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Sebastian Reichel <sebastian.reichel@collabora.com>
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: Thu, 3 Dec 2026 17:48:53 +0100 [thread overview]
Message-ID: <2026120340-designing-playroom-0d07@gregkh> (raw)
In-Reply-To: <20261114-b4-rockchip-dwc3-rockchip-glue-v19-5-b79fb5f4b42a@collabora.com>
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()?
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
next prev parent reply other threads:[~2026-12-04 3:22 UTC|newest]
Thread overview: 48+ 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:01 ` Sebastian Reichel
2026-11-14 1:01 ` 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 ` Sebastian Reichel
2026-11-14 1:02 ` Sebastian Reichel
2026-11-14 1:15 ` sashiko-bot
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 ` Sebastian Reichel
2026-11-14 1:02 ` Sebastian Reichel
2026-11-14 1:17 ` sashiko-bot
2026-11-14 1:02 ` [PATCH v19 3/6] usb: dwc3: rockchip: introduce glue driver Sebastian Reichel
2026-11-14 1:02 ` Sebastian Reichel
2026-11-14 1:02 ` Sebastian Reichel
2026-11-14 1:08 ` sashiko-bot
2026-12-04 18:27 ` Thinh Nguyen
2026-12-04 18:27 ` Thinh Nguyen
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 ` Sebastian Reichel
2026-11-14 1:02 ` Sebastian Reichel
2026-11-14 1:05 ` sashiko-bot
2026-11-14 1:02 ` [PATCH v19 5/6] usb: dwc3: core: only access GUSB3PIPECTL under lock Sebastian Reichel
2026-11-14 1:02 ` Sebastian Reichel
2026-11-14 1:02 ` Sebastian Reichel
2026-11-14 1:09 ` sashiko-bot
2026-12-03 16:48 ` Greg Kroah-Hartman [this message]
2026-12-03 16:48 ` Greg Kroah-Hartman
2026-12-03 16:48 ` Greg Kroah-Hartman
2026-12-04 16:59 ` Sebastian Reichel
2026-12-04 16:59 ` Sebastian Reichel
2026-12-04 16:59 ` Sebastian Reichel
2026-12-04 19:04 ` Thinh Nguyen
2026-12-04 19:04 ` Thinh Nguyen
2026-12-04 19:04 ` Thinh Nguyen
2026-12-04 22:45 ` Thinh Nguyen
2026-12-04 22:45 ` Thinh Nguyen
2026-12-04 22:45 ` Thinh Nguyen
2026-11-14 1:02 ` [PATCH v19 6/6] usb: dwc3: rockchip: add USBDP PHY reset quirk Sebastian Reichel
2026-11-14 1:02 ` Sebastian Reichel
2026-11-14 1:02 ` Sebastian Reichel
2026-11-14 1:28 ` sashiko-bot
2026-12-04 18:52 ` Thinh Nguyen
2026-12-04 18:52 ` Thinh Nguyen
2026-12-04 18:52 ` Thinh Nguyen
2026-11-21 11:37 ` [PATCH v19 0/6] usb: dwc3: introduce Rockchip glue driver Ricardo Pardini
2026-11-21 11:37 ` Ricardo Pardini
2026-11-21 11:37 ` 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=2026120340-designing-playroom-0d07@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=Thinh.Nguyen@synopsys.com \
--cc=alchark@flipper.net \
--cc=chaoyi.chen@rock-chips.com \
--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=sebastian.reichel@collabora.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.