* [PATCH] usb: dwc3: qcom: Don't leave BCR asserted
@ 2025-06-04 6:00 Krishna Kurapati
2025-06-06 0:11 ` Thinh Nguyen
0 siblings, 1 reply; 4+ messages in thread
From: Krishna Kurapati @ 2025-06-04 6:00 UTC (permalink / raw)
To: Thinh Nguyen, Greg Kroah-Hartman, Philipp Zabel, Bjorn Andersson
Cc: linux-arm-msm, linux-usb, linux-kernel, Krishna Kurapati
Leaving the USB BCR asserted prevents the associated GDSC to turn on. This
blocks any subsequent attempts of probing the device, e.g. after a probe
deferral, with the following showing in the log:
[ 1.332226] usb30_prim_gdsc status stuck at 'off'
Leave the BCR deasserted when exiting the driver to avoid this issue.
Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
---
drivers/usb/dwc3/dwc3-qcom.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
index 7334de85ad10..ca7e1c02773a 100644
--- a/drivers/usb/dwc3/dwc3-qcom.c
+++ b/drivers/usb/dwc3/dwc3-qcom.c
@@ -680,12 +680,12 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
ret = reset_control_deassert(qcom->resets);
if (ret) {
dev_err(&pdev->dev, "failed to deassert resets, err=%d\n", ret);
- goto reset_assert;
+ return ret;
}
ret = clk_bulk_prepare_enable(qcom->num_clocks, qcom->clks);
if (ret < 0)
- goto reset_assert;
+ return ret;
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!r) {
@@ -755,8 +755,6 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
dwc3_core_remove(&qcom->dwc);
clk_disable:
clk_bulk_disable_unprepare(qcom->num_clocks, qcom->clks);
-reset_assert:
- reset_control_assert(qcom->resets);
return ret;
}
@@ -771,7 +769,6 @@ static void dwc3_qcom_remove(struct platform_device *pdev)
clk_bulk_disable_unprepare(qcom->num_clocks, qcom->clks);
dwc3_qcom_interconnect_exit(qcom);
- reset_control_assert(qcom->resets);
}
static int dwc3_qcom_pm_suspend(struct device *dev)
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] usb: dwc3: qcom: Don't leave BCR asserted
2025-06-04 6:00 [PATCH] usb: dwc3: qcom: Don't leave BCR asserted Krishna Kurapati
@ 2025-06-06 0:11 ` Thinh Nguyen
2025-06-17 21:28 ` Konrad Dybcio
0 siblings, 1 reply; 4+ messages in thread
From: Thinh Nguyen @ 2025-06-06 0:11 UTC (permalink / raw)
To: Krishna Kurapati
Cc: Thinh Nguyen, Greg Kroah-Hartman, Philipp Zabel, Bjorn Andersson,
linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org
On Wed, Jun 04, 2025, Krishna Kurapati wrote:
> Leaving the USB BCR asserted prevents the associated GDSC to turn on. This
> blocks any subsequent attempts of probing the device, e.g. after a probe
> deferral, with the following showing in the log:
>
> [ 1.332226] usb30_prim_gdsc status stuck at 'off'
>
> Leave the BCR deasserted when exiting the driver to avoid this issue.
>
> Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
Is this a fix? Does this need to be backported to stable?
Either way,
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Thanks,
Thinh
> ---
> drivers/usb/dwc3/dwc3-qcom.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
> index 7334de85ad10..ca7e1c02773a 100644
> --- a/drivers/usb/dwc3/dwc3-qcom.c
> +++ b/drivers/usb/dwc3/dwc3-qcom.c
> @@ -680,12 +680,12 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
> ret = reset_control_deassert(qcom->resets);
> if (ret) {
> dev_err(&pdev->dev, "failed to deassert resets, err=%d\n", ret);
> - goto reset_assert;
> + return ret;
> }
>
> ret = clk_bulk_prepare_enable(qcom->num_clocks, qcom->clks);
> if (ret < 0)
> - goto reset_assert;
> + return ret;
>
> r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> if (!r) {
> @@ -755,8 +755,6 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
> dwc3_core_remove(&qcom->dwc);
> clk_disable:
> clk_bulk_disable_unprepare(qcom->num_clocks, qcom->clks);
> -reset_assert:
> - reset_control_assert(qcom->resets);
>
> return ret;
> }
> @@ -771,7 +769,6 @@ static void dwc3_qcom_remove(struct platform_device *pdev)
> clk_bulk_disable_unprepare(qcom->num_clocks, qcom->clks);
>
> dwc3_qcom_interconnect_exit(qcom);
> - reset_control_assert(qcom->resets);
> }
>
> static int dwc3_qcom_pm_suspend(struct device *dev)
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] usb: dwc3: qcom: Don't leave BCR asserted
2025-06-06 0:11 ` Thinh Nguyen
@ 2025-06-17 21:28 ` Konrad Dybcio
2025-06-18 5:22 ` Krishna Kurapati
0 siblings, 1 reply; 4+ messages in thread
From: Konrad Dybcio @ 2025-06-17 21:28 UTC (permalink / raw)
To: Thinh Nguyen, Krishna Kurapati
Cc: Greg Kroah-Hartman, Philipp Zabel, Bjorn Andersson,
linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org
On 6/6/25 2:11 AM, Thinh Nguyen wrote:
> On Wed, Jun 04, 2025, Krishna Kurapati wrote:
>> Leaving the USB BCR asserted prevents the associated GDSC to turn on. This
>> blocks any subsequent attempts of probing the device, e.g. after a probe
>> deferral, with the following showing in the log:
>>
>> [ 1.332226] usb30_prim_gdsc status stuck at 'off'
>>
>> Leave the BCR deasserted when exiting the driver to avoid this issue.
>>
>> Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
>
> Is this a fix? Does this need to be backported to stable?
yes and "might as well" - this file was re-made last cycle and this
patch won't apply without the recent
e33ebb133a24 ("usb: dwc3: qcom: Use bulk clock API and devres")
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] usb: dwc3: qcom: Don't leave BCR asserted
2025-06-17 21:28 ` Konrad Dybcio
@ 2025-06-18 5:22 ` Krishna Kurapati
0 siblings, 0 replies; 4+ messages in thread
From: Krishna Kurapati @ 2025-06-18 5:22 UTC (permalink / raw)
To: Konrad Dybcio, Thinh Nguyen
Cc: Greg Kroah-Hartman, Philipp Zabel, Bjorn Andersson,
linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org
On 6/18/2025 2:58 AM, Konrad Dybcio wrote:
> On 6/6/25 2:11 AM, Thinh Nguyen wrote:
>> On Wed, Jun 04, 2025, Krishna Kurapati wrote:
>>> Leaving the USB BCR asserted prevents the associated GDSC to turn on. This
>>> blocks any subsequent attempts of probing the device, e.g. after a probe
>>> deferral, with the following showing in the log:
>>>
>>> [ 1.332226] usb30_prim_gdsc status stuck at 'off'
>>>
>>> Leave the BCR deasserted when exiting the driver to avoid this issue.
>>>
>>> Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
>>
>> Is this a fix? Does this need to be backported to stable?
>
> yes and "might as well" - this file was re-made last cycle and this
> patch won't apply without the recent
>
> e33ebb133a24 ("usb: dwc3: qcom: Use bulk clock API and devres")
>
I sent the patch on top of usb-next. Perhaps when I made this patch, the
above mentioned patch was already present.
Thanks for the review. Will send a v2 with cc'ing stable and adding a
fixes tag.
Regards,
Krishna,
> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
>
> Konrad
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-06-18 5:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-04 6:00 [PATCH] usb: dwc3: qcom: Don't leave BCR asserted Krishna Kurapati
2025-06-06 0:11 ` Thinh Nguyen
2025-06-17 21:28 ` Konrad Dybcio
2025-06-18 5:22 ` Krishna Kurapati
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).