[PATCH] Revert "usb: dwc3: qcom: Add support to skip phy management by USB core"
Subsystems:
arm/qualcomm mailing list, designware usb3 drd ip driver, the rest, usb subsystem
COLD39d
IN LINUX-NEXT
Queued in linux-next as bb4f62bfaa3f on 2026-09-10.
4 messages,
4 authors,
2026-09-10 · open the first message on its own page
This reverts commit be7b1c68cd3e4fc0f5a4e1b85696de1052f21f2f.
Commit be7b1c68cd3e ("usb: dwc3: qcom: Add support to skip phy management by USB core")
is causing a regression on qualcomm platforms.
During role switch it tends to cause the following crash:
[ 5.620951] refcount_t: underflow; use-after-free.
[ 5.621114] Call trace:
[ 5.621115] refcount_warn_saturate+0xd8/0x140 (P)
[ 5.621117] kobject_put+0x11c/0x230
[ 5.621121] software_node_notify_remove+0xdc/0xf8
[ 5.621124] device_del+0x1dc/0x328
[ 5.621126] usb_disconnect+0x1d8/0x348
[ 5.621129] usb_remove_hcd+0x100/0x2a8
[ 5.621131] xhci_plat_remove+0x8c/0x170
[ 5.621134] platform_remove+0x28/0x40
[ 5.621135] device_release_driver_internal+0x174/0x290
[ 5.621138] device_release_driver+0x20/0x38
[ 5.621140] bus_remove_device+0x19c/0x1f8
[ 5.621142] device_del+0x1c4/0x328
[ 5.621143] platform_device_unregister+0x34/0xc0
[ 5.621145] dwc3_host_exit+0x50/0x70
[ 5.621146] __dwc3_set_mode+0xa4/0x378
[ 5.644535] Unable to handle kernel paging request at virtual address
[ 5.644657] Workqueue: events_freezable __dwc3_set_mode
[ 5.644664] pc : __pi_strcmp+0x9c/0x140
[ 5.644668] lr : software_node_property_present+0x60/0x98
[ 5.644697] Call trace:
[ 5.644698] __pi_strcmp+0x9c/0x140 (P)
[ 5.644700] device_property_present+0x9c/0xc0
[ 5.644703] dwc3_gadget_init+0x230/0x7b0
[ 5.644704] __dwc3_set_mode+0x314/0x378
[ 5.644707] process_scheduled_works+0x1b8/0x538
[ 5.644710] worker_thread+0x1fc/0x2f8
[ 5.644711] kthread+0x114/0x148
[ 5.644713] ret_from_fork+0x10/0x20
Revert skipping of usb core phy management for Qualcomm platforms to avoid
the above issues.
Reported-by: Val Packett <redacted>
Closes: https://lore.kernel.org/all/f9926203-ee69-4e18-b6c7-95261ba10807@packett.cool/
Signed-off-by: Krishna Kurapati <redacted>
---
drivers/usb/dwc3/dwc3-qcom.c | 15 ---------------
1 file changed, 15 deletions(-)
diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
index ba26e61df915..ac68b4218b56 100644
--- a/drivers/usb/dwc3/dwc3-qcom.c
+++ b/drivers/usb/dwc3/dwc3-qcom.c
@@ -19,7 +19,6 @@
#include <linux/iopoll.h>
#include <linux/usb/hcd.h>
#include <linux/usb.h>
-#include <linux/property.h>
#include "core.h"
#include "glue.h"
@@ -420,16 +419,6 @@ static irqreturn_t qcom_dwc3_resume_irq(int irq, void *data)
return IRQ_HANDLED;
}
-static int dwc3_qcom_set_swnode(struct device *dev)
-{
- const struct property_entry props[] = {
- PROPERTY_ENTRY_BOOL("xhci-skip-phy-init-quirk"),
- {}
- };
-
- return device_create_managed_software_node(dev, props, NULL);
-}
-
static void dwc3_qcom_select_utmi_clk(struct dwc3_qcom *qcom)
{
/* Configure dwc3 to use UTMI clock as PIPE clock not present */@@ -694,10 +683,6 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
if (ignore_pipe_clk)
dwc3_qcom_select_utmi_clk(qcom);
- ret = dwc3_qcom_set_swnode(dev);
- if (ret)
- goto clk_disable;
-
qcom->mode = usb_get_dr_mode(dev);
if (qcom->mode == USB_DR_MODE_HOST) {
---
base-commit: 34c9c5517033a74039a54dfab24e7bf767a4e0e4
change-id: 20260909-xhci-fixes-revert-59e68fe3b641
Best regards,
--
Krishna Kurapati [off-list ref]
On Wed, Sep 09, 2026, Krishna Kurapati wrote:
quoted hunk
This reverts commit be7b1c68cd3e4fc0f5a4e1b85696de1052f21f2f.
Commit be7b1c68cd3e ("usb: dwc3: qcom: Add support to skip phy management by USB core")
is causing a regression on qualcomm platforms.
During role switch it tends to cause the following crash:
[ 5.620951] refcount_t: underflow; use-after-free.
[ 5.621114] Call trace:
[ 5.621115] refcount_warn_saturate+0xd8/0x140 (P)
[ 5.621117] kobject_put+0x11c/0x230
[ 5.621121] software_node_notify_remove+0xdc/0xf8
[ 5.621124] device_del+0x1dc/0x328
[ 5.621126] usb_disconnect+0x1d8/0x348
[ 5.621129] usb_remove_hcd+0x100/0x2a8
[ 5.621131] xhci_plat_remove+0x8c/0x170
[ 5.621134] platform_remove+0x28/0x40
[ 5.621135] device_release_driver_internal+0x174/0x290
[ 5.621138] device_release_driver+0x20/0x38
[ 5.621140] bus_remove_device+0x19c/0x1f8
[ 5.621142] device_del+0x1c4/0x328
[ 5.621143] platform_device_unregister+0x34/0xc0
[ 5.621145] dwc3_host_exit+0x50/0x70
[ 5.621146] __dwc3_set_mode+0xa4/0x378
[ 5.644535] Unable to handle kernel paging request at virtual address
[ 5.644657] Workqueue: events_freezable __dwc3_set_mode
[ 5.644664] pc : __pi_strcmp+0x9c/0x140
[ 5.644668] lr : software_node_property_present+0x60/0x98
[ 5.644697] Call trace:
[ 5.644698] __pi_strcmp+0x9c/0x140 (P)
[ 5.644700] device_property_present+0x9c/0xc0
[ 5.644703] dwc3_gadget_init+0x230/0x7b0
[ 5.644704] __dwc3_set_mode+0x314/0x378
[ 5.644707] process_scheduled_works+0x1b8/0x538
[ 5.644710] worker_thread+0x1fc/0x2f8
[ 5.644711] kthread+0x114/0x148
[ 5.644713] ret_from_fork+0x10/0x20
Revert skipping of usb core phy management for Qualcomm platforms to avoid
the above issues.
Reported-by: Val Packett <redacted>
Closes: https://urldefense.com/v3/__https://lore.kernel.org/all/f9926203-ee69-4e18-b6c7-95261ba10807@packett.cool/__;!!A4F2R9G_pg!ZuwuOzXLwm-pammHnrjJpfODYLL9KLgum4PiPdImtCF772khuW9jycQW4H2IVZsMxYiIY52jfTIfx-DfXKUA4iBeL3Nbptfnlcw8_A$
Signed-off-by: Krishna Kurapati <redacted>
---
drivers/usb/dwc3/dwc3-qcom.c | 15 ---------------
1 file changed, 15 deletions(-)
diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
index ba26e61df915..ac68b4218b56 100644
--- a/drivers/usb/dwc3/dwc3-qcom.c
+++ b/drivers/usb/dwc3/dwc3-qcom.c
@@ -19,7 +19,6 @@
#include <linux/iopoll.h>
#include <linux/usb/hcd.h>
#include <linux/usb.h>
-#include <linux/property.h>
#include "core.h"
#include "glue.h"
@@ -420,16 +419,6 @@ static irqreturn_t qcom_dwc3_resume_irq(int irq, void *data)
return IRQ_HANDLED;
}
-static int dwc3_qcom_set_swnode(struct device *dev)
-{
- const struct property_entry props[] = {
- PROPERTY_ENTRY_BOOL("xhci-skip-phy-init-quirk"),
- {}
- };
-
- return device_create_managed_software_node(dev, props, NULL);
-}
-
static void dwc3_qcom_select_utmi_clk(struct dwc3_qcom *qcom)
{
/* Configure dwc3 to use UTMI clock as PIPE clock not present */@@ -694,10 +683,6 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
if (ignore_pipe_clk)
dwc3_qcom_select_utmi_clk(qcom);
- ret = dwc3_qcom_set_swnode(dev);
- if (ret)
- goto clk_disable;
-
qcom->mode = usb_get_dr_mode(dev);
if (qcom->mode == USB_DR_MODE_HOST) {
---
base-commit: 34c9c5517033a74039a54dfab24e7bf767a4e0e4
change-id: 20260909-xhci-fixes-revert-59e68fe3b641
Best regards,
--
Krishna Kurapati [off-list ref]
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Thanks,
Thinh
On Wed, Sep 09, 2026 at 03:19:10PM +0530, Krishna Kurapati wrote:
This reverts commit be7b1c68cd3e4fc0f5a4e1b85696de1052f21f2f.
Commit be7b1c68cd3e ("usb: dwc3: qcom: Add support to skip phy management by USB core")
is causing a regression on qualcomm platforms.
During role switch it tends to cause the following crash:
[ 5.620951] refcount_t: underflow; use-after-free.
[ 5.621114] Call trace:
[ 5.621115] refcount_warn_saturate+0xd8/0x140 (P)
[ 5.621117] kobject_put+0x11c/0x230
[ 5.621121] software_node_notify_remove+0xdc/0xf8
[ 5.621124] device_del+0x1dc/0x328
[ 5.621126] usb_disconnect+0x1d8/0x348
[ 5.621129] usb_remove_hcd+0x100/0x2a8
[ 5.621131] xhci_plat_remove+0x8c/0x170
[ 5.621134] platform_remove+0x28/0x40
[ 5.621135] device_release_driver_internal+0x174/0x290
[ 5.621138] device_release_driver+0x20/0x38
[ 5.621140] bus_remove_device+0x19c/0x1f8
[ 5.621142] device_del+0x1c4/0x328
[ 5.621143] platform_device_unregister+0x34/0xc0
[ 5.621145] dwc3_host_exit+0x50/0x70
[ 5.621146] __dwc3_set_mode+0xa4/0x378
[ 5.644535] Unable to handle kernel paging request at virtual address
[ 5.644657] Workqueue: events_freezable __dwc3_set_mode
[ 5.644664] pc : __pi_strcmp+0x9c/0x140
[ 5.644668] lr : software_node_property_present+0x60/0x98
[ 5.644697] Call trace:
[ 5.644698] __pi_strcmp+0x9c/0x140 (P)
[ 5.644700] device_property_present+0x9c/0xc0
[ 5.644703] dwc3_gadget_init+0x230/0x7b0
[ 5.644704] __dwc3_set_mode+0x314/0x378
[ 5.644707] process_scheduled_works+0x1b8/0x538
[ 5.644710] worker_thread+0x1fc/0x2f8
[ 5.644711] kthread+0x114/0x148
[ 5.644713] ret_from_fork+0x10/0x20
Revert skipping of usb core phy management for Qualcomm platforms to avoid
the above issues.
Reported-by: Val Packett <redacted>
Closes: https://lore.kernel.org/all/f9926203-ee69-4e18-b6c7-95261ba10807@packett.cool/
Signed-off-by: Krishna Kurapati <redacted>
I'm seeing a duplicate sysfs filename issue on Nord platform. This revert
fixes it, so:
Tested-by: Shawn Guo <redacted>
[ 6.412085] sysfs: cannot create duplicate filename '/devices/platform/soc@0/a400000.usb/software_node'
[ 6.412088] CPU: 3 UID: 0 PID: 128 Comm: kworker/u73:3 Not tainted 7.3.0-rc2-next-20260908-00064-gde909f9bbb2a #16 PREEMPT(full)
[ 6.412090] Hardware name: Qualcomm Technologies, Inc. SA8797P Ride Embedded (DT)
[ 6.412091] Workqueue: events_unbound deferred_probe_work_func
[ 6.412098] Call trace:
[ 6.412099] show_stack+0x18/0x24 (C)
[ 6.412103] dump_stack_lvl+0x74/0x8c
[ 6.412107] dump_stack+0x18/0x24
[ 6.412109] sysfs_warn_dup+0x64/0x80
[ 6.412112] sysfs_do_create_link_sd+0xf0/0xf8
[ 6.412114] sysfs_create_link+0x20/0x40
[ 6.412116] software_node_notify+0xb0/0x100
[ 6.412117] device_create_managed_software_node+0xec/0x108
[ 6.412119] dwc3_qcom_set_swnode+0x5c/0x8c
[ 6.412122] dwc3_qcom_probe+0x4d4/0x9c4
[ 6.412123] platform_probe+0x5c/0x9c
[ 6.412125] really_probe+0xbc/0x29c
[ 6.412127] __driver_probe_device+0x16c/0x19c
[ 6.412129] driver_probe_device+0x3c/0x114
[ 6.412131] __device_attach_driver+0xb8/0x118
[ 6.412132] bus_for_each_drv+0x88/0xe8
[ 6.412134] __device_attach+0xa0/0x190
[ 6.412136] device_initial_probe+0x50/0x54
[ 6.412137] bus_probe_device+0x38/0xa0
[ 6.412139] deferred_probe_work_func+0x88/0xc0
[ 6.412141] process_one_work+0x180/0x2dc
[ 6.412143] worker_thread+0x188/0x300
[ 6.412145] kthread+0x118/0x124
[ 6.412146] ret_from_fork+0x10/0x20
On Wed, Sep 09, 2026 at 03:19:10PM +0530, Krishna Kurapati wrote:
This reverts commit be7b1c68cd3e4fc0f5a4e1b85696de1052f21f2f.
Commit be7b1c68cd3e ("usb: dwc3: qcom: Add support to skip phy management by USB core")
is causing a regression on qualcomm platforms.
During role switch it tends to cause the following crash:
[ 5.620951] refcount_t: underflow; use-after-free.
[ 5.621114] Call trace:
[ 5.621115] refcount_warn_saturate+0xd8/0x140 (P)
[ 5.621117] kobject_put+0x11c/0x230
[ 5.621121] software_node_notify_remove+0xdc/0xf8
[ 5.621124] device_del+0x1dc/0x328
[ 5.621126] usb_disconnect+0x1d8/0x348
[ 5.621129] usb_remove_hcd+0x100/0x2a8
[ 5.621131] xhci_plat_remove+0x8c/0x170
[ 5.621134] platform_remove+0x28/0x40
[ 5.621135] device_release_driver_internal+0x174/0x290
[ 5.621138] device_release_driver+0x20/0x38
[ 5.621140] bus_remove_device+0x19c/0x1f8
[ 5.621142] device_del+0x1c4/0x328
[ 5.621143] platform_device_unregister+0x34/0xc0
[ 5.621145] dwc3_host_exit+0x50/0x70
[ 5.621146] __dwc3_set_mode+0xa4/0x378
[ 5.644535] Unable to handle kernel paging request at virtual address
[ 5.644657] Workqueue: events_freezable __dwc3_set_mode
[ 5.644664] pc : __pi_strcmp+0x9c/0x140
[ 5.644668] lr : software_node_property_present+0x60/0x98
[ 5.644697] Call trace:
[ 5.644698] __pi_strcmp+0x9c/0x140 (P)
[ 5.644700] device_property_present+0x9c/0xc0
[ 5.644703] dwc3_gadget_init+0x230/0x7b0
[ 5.644704] __dwc3_set_mode+0x314/0x378
[ 5.644707] process_scheduled_works+0x1b8/0x538
[ 5.644710] worker_thread+0x1fc/0x2f8
[ 5.644711] kthread+0x114/0x148
[ 5.644713] ret_from_fork+0x10/0x20
Revert skipping of usb core phy management for Qualcomm platforms to avoid
the above issues.
Reported-by: Val Packett <redacted>
Closes: https://lore.kernel.org/all/f9926203-ee69-4e18-b6c7-95261ba10807@packett.cool/
Signed-off-by: Krishna Kurapati <redacted>
It was causing the issue on Hawi too; revert fixes it.
Tested-by: Mukesh Ojha <redacted> #Hawi
--
-Mukesh Ojha