Skip to contentSkip to conversation

FAILED: patch "[PATCH] usb: dwc3: qcom: Don't leave BCR asserted" failed to apply to 5.4-stable tree

PATCH Superseded [email protected] 3 participants 5 messages Jul 21, 2025 – Jul 22, 2025

Subsystems (4)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 5.4-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

To reproduce the conflict and resubmit, you may use the following commands:

git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.4.y
git checkout FETCH_HEAD
git cherry-pick -x ef8abc0ba49ce717e6bc4124e88e59982671f3b5
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2025072117-left-ground-e763@gregkh' --subject-prefix 'PATCH 5.4.y' HEAD^..

Possible dependencies:

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From ef8abc0ba49ce717e6bc4124e88e59982671f3b5 Mon Sep 17 00:00:00 2001
From: Krishna Kurapati <[email protected]>
Date: Wed, 9 Jul 2025 18:59:00 +0530
Subject: [PATCH] usb: dwc3: qcom: Don't leave BCR asserted

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.

drivers/usb/dwc3/dwc3-qcom.c +2 -5
index 7334de85ad10..ca7e1c02773a 100644
@@ -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)
maintainer
#1 lore raw

PATCH 1/1 usb: dwc3: qcom: Don't leave BCR asserted

From: Krishna Kurapati <[email protected]>

[ Upstream commit ef8abc0ba49ce717e6bc4124e88e59982671f3b5 ]

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.

Cc stable <[email protected]>
Fixes a4333c3a6ba9 ("usb: dwc3: Add Qualcomm DWC3 glue driver")
[ adapted to individual clock management API instead of bulk clock operations ]
---
 drivers/usb/dwc3/dwc3-qcom.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/usb/dwc3/dwc3-qcom.c +3 -5
index 742be1e07a01d..4874a6442c806 100644
@@ -615,13 +615,13 @@ 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 = dwc3_qcom_clk_init(qcom, of_clk_get_parent_count(np));
 	if (ret) {
 		dev_err(dev, "failed to get clocks\n");
-		goto reset_assert;
+		return ret;
 	}
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -700,8 +700,6 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
 		clk_disable_unprepare(qcom->clks[i]);
 		clk_put(qcom->clks[i]);
 	}
-reset_assert:
-	reset_control_assert(qcom->resets);
 
 	return ret;
 }
@@ -725,7 +723,7 @@ static int dwc3_qcom_remove(struct platform_device *pdev)
 	}
 	qcom->num_clocks = 0;
 
-	reset_control_assert(qcom->resets);
+	dwc3_qcom_interconnect_exit(qcom);
 
 	pm_runtime_allow(dev);
 	pm_runtime_disable(dev);
Signature · 1 line
2.39.5
#2 lore raw

Re: [PATCH 5.4.y] usb: dwc3: qcom: Don't leave BCR asserted

Hi Sasha,

Quoted 55 lines · Sasha Levin

From: Krishna Kurapati <[email protected]>

[ Upstream commit ef8abc0ba49ce717e6bc4124e88e59982671f3b5 ]

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.

Cc stable <[email protected]>
Fixes a4333c3a6ba9 ("usb: dwc3: Add Qualcomm DWC3 glue driver")
[ adapted to individual clock management API instead of bulk clock operations ]
---
  drivers/usb/dwc3/dwc3-qcom.c | 8 +++-----
  1 file changed, 3 insertions(+), 5 deletions(-)
drivers/usb/dwc3/dwc3-qcom.c +2 -4
index 742be1e07a01d..4874a6442c806 100644
@@ -615,13 +615,13 @@ 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 = dwc3_qcom_clk_init(qcom, of_clk_get_parent_count(np));
  	if (ret) {
  		dev_err(dev, "failed to get clocks\n");
-		goto reset_assert;
+		return ret;
  	}
 
  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -700,8 +700,6 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
  		clk_disable_unprepare(qcom->clks[i]);
  		clk_put(qcom->clks[i]);
  	}
-reset_assert:
-	reset_control_assert(qcom->resets);
 
  	return ret;
  }

drivers/usb/dwc3/dwc3-qcom.c static int dwc3_qcom_remove(struct platform_device *pdev) · line 727

Quoted 6 lines
drivers/usb/dwc3/dwc3-qcom.c +1 -1
@@ -725,7 +723,7 @@ static int dwc3_qcom_remove(struct platform_device *pdev)
  	}
  	qcom->num_clocks = 0;
 
-	reset_control_assert(qcom->resets);
+	dwc3_qcom_interconnect_exit(qcom);
 

^^ This part of diff doesn't look good to me. Can you please double check the conflict resolution ? (Probably shouldn't have addition in this hunk)

Thanks,
Harshit

Quoted 2 lines
drivers/usb/dwc3/dwc3-qcom.c +0 -0
  	pm_runtime_allow(dev);
  	pm_runtime_disable(dev);
maintainer
#3 lore raw

Re: [PATCH 5.4.y] usb: dwc3: qcom: Don't leave BCR asserted

Quoted 53 lines · Harshit Mogalapalli

Hi Sasha,

Quoted 50 lines · Sasha Levin

From: Krishna Kurapati <[email protected]>

[ Upstream commit ef8abc0ba49ce717e6bc4124e88e59982671f3b5 ]

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.

Cc stable <[email protected]>
Fixes a4333c3a6ba9 ("usb: dwc3: Add Qualcomm DWC3 glue driver")
[ adapted to individual clock management API instead of bulk clock operations ]
---
 drivers/usb/dwc3/dwc3-qcom.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/usb/dwc3/dwc3-qcom.c +2 -4
index 742be1e07a01d..4874a6442c806 100644
@@ -615,13 +615,13 @@ 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 = dwc3_qcom_clk_init(qcom, of_clk_get_parent_count(np));
 	if (ret) {
 		dev_err(dev, "failed to get clocks\n");
-		goto reset_assert;
+		return ret;
 	}
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -700,8 +700,6 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
 		clk_disable_unprepare(qcom->clks[i]);
 		clk_put(qcom->clks[i]);
 	}
-reset_assert:
-	reset_control_assert(qcom->resets);
 	return ret;
Quoted 8 lines

drivers/usb/dwc3/dwc3-qcom.c static int dwc3_qcom_remove(struct platform_device *pdev) · line 725

Quoted 6 lines
drivers/usb/dwc3/dwc3-qcom.c +1 -1
 }
@@ -725,7 +723,7 @@ static int dwc3_qcom_remove(struct platform_device *pdev)
 	}
 	qcom->num_clocks = 0;
-	reset_control_assert(qcom->resets);
+	dwc3_qcom_interconnect_exit(qcom);

^^ This part of diff doesn't look good to me. Can you please double check the conflict resolution ? (Probably shouldn't have addition in this hunk)

You're right! It came from the 5.10 backport which I've cherry picked onto 5.4. I'll resend.

Signature · 2 lines
Thanks,
Sasha
maintainer
#4 lore raw

PATCH v2 1/1 usb: dwc3: qcom: Don't leave BCR asserted

In reply to [email protected]

From: Krishna Kurapati <[email protected]>

[ Upstream commit ef8abc0ba49ce717e6bc4124e88e59982671f3b5 ]

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.

Cc stable <[email protected]>
Fixes a4333c3a6ba9 ("usb: dwc3: Add Qualcomm DWC3 glue driver")
[ adapted to individual clock management API instead of bulk clock operations ]
---
 drivers/usb/dwc3/dwc3-qcom.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/usb/dwc3/dwc3-qcom.c +2 -6
index 742be1e07a01d..8be05c7fc98b8 100644
@@ -615,13 +615,13 @@ 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 = dwc3_qcom_clk_init(qcom, of_clk_get_parent_count(np));
 	if (ret) {
 		dev_err(dev, "failed to get clocks\n");
-		goto reset_assert;
+		return ret;
 	}
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -700,8 +700,6 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
 		clk_disable_unprepare(qcom->clks[i]);
 		clk_put(qcom->clks[i]);
 	}
-reset_assert:
-	reset_control_assert(qcom->resets);
 
 	return ret;
 }
@@ -725,8 +723,6 @@ static int dwc3_qcom_remove(struct platform_device *pdev)
 	}
 	qcom->num_clocks = 0;
 
-	reset_control_assert(qcom->resets);
-
 	pm_runtime_allow(dev);
 	pm_runtime_disable(dev);
 
Signature · 1 line
2.39.5