Re: [PATCH v3 3/3] usb: dwc3: imx8mp: disable auto suspend for host role

From: Franz Schnyder

Date: Thu May 07 2026 - 06:46:30 EST


On Thu, Jan 08, 2026 at 04:14:33PM +0800, Xu Yang wrote:
> Do dwc3 core auto suspend enable for device and disable for host
> , this can make sure dwc3 core device auto suspend setting is
> correct all the time, the background of disable dwc3 core device
> auto suspend is to make its parent device suspend immediately
> (so wakeup enable can be enabled) after xhci-plat device suspended,
> for device mode, we keep the dwc3 core device auto suspend is to
> give some wait for gadget to be enumerated.
>
> Note: It's a temporary solution until we switch to using the new
> flatten model.
>
> Acked-by: Thinh Nguyen <Thinh.Nguyen@xxxxxxxxxxxx>
> Signed-off-by: Xu Yang <xu.yang_2@xxxxxxx>

Hi Xu,

We have a kernel issue introduced by this patch on an iMX95, where we
use the dwc3 usb as otg. This appears to be due to a race condition that
occurs during probe, when the parent attempts to access the driver data
from the dwc3 child. I saw your work on the new flattened model driver
for the iMX SoCs and that it will soon be applied to the iMX95 as well.
Does this mean that the issue shown below should no longer appear, as
there will be no parent/child dependency?

Do you think there are any actions needed on this patch?

Here the warning with decoded trace:

[ 6.905882] ------------[ cut here ]------------
[ 6.910518] WARNING: drivers/base/core.c:1640 at device_del+0x2b4/0x384, CPU#4: 5/87
[ 6.919309] Modules linked in: libaes(+) tcpci(+) ulpi tcpm phy_fsl_imx8mq_usb(+) gf128mul snd_soc_simple_card(+) ehci_hcd imx_pc4
[ 6.964627] CPU: 4 UID: 0 PID: 87 Comm: kworker/u24:5 Not tainted 7.0.0-rc1+ #2 PREEMPT
[ 6.972716] Hardware name: Aquila iMX95 on Aquila Development Board (DT)
[ 6.979409] Workqueue: events_unbound deferred_probe_work_func
[ 6.985247] pstate: 20400009 (nzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[ 6.992199] pc : device_del (drivers/base/core.c:1640 drivers/base/core.c:3882)
[ 6.996028] lr : device_del (drivers/base/core.c:1634 drivers/base/core.c:3882)
[ 6.999865] sp : ffff800080b339f0
[ 7.003169] x29: ffff800080b339f0 x28: 0000000000000000 x27: 0000000000000000
[ 7.010295] x26: ffff00008004ac28 x25: ffff0001ff067610 x24: ffff00008befdcc0
[ 7.017427] x23: ffff000080ad8810 x22: 0000000004208060 x21: ffffa5bb53ea78f0
[ 7.024560] x20: ffff00008befdc10 x19: ffff00008befdcb8 x18: 0000000000000000
[ 7.031693] x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000
[ 7.038825] x14: 0000000000000004 x13: ffff000080129910 x12: 0000000000000000
[ 7.045958] x11: ffff0000822ac0e8 x10: ffff0000822ac000 x9 : ffff000080129910
[ 7.053090] x8 : ffff0000822ac028 x7 : 0000000000000000 x6 : ffff0000822af458
[ 7.060223] x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000000
[ 7.067356] x2 : ffff00008253e580 x1 : 0000000000000003 x0 : ffff0000895d1400
[ 7.074485] Call trace:
[ 7.076923] device_del (drivers/base/core.c:1640 drivers/base/core.c:3882) (P)
[ 7.080754] platform_device_del.part.0 (drivers/base/platform.c:794)
[ 7.085458] platform_device_unregister (drivers/base/platform.c:593 drivers/base/platform.c:835)
[ 7.090164] of_platform_device_destroy (drivers/of/platform.c:621 drivers/of/platform.c:607)
[ 7.094950] device_for_each_child_reverse (drivers/base/core.c:4048)
[ 7.099922] of_platform_depopulate (./include/linux/of.h:208 drivers/of/platform.c:644 drivers/of/platform.c:640)
[ 7.104282] dwc3_imx8mp_probe (drivers/usb/dwc3/dwc3-imx8mp.c:291) dwc3_imx8mp
[ 7.109588] platform_probe (drivers/base/platform.c:1449)
[ 7.113260] really_probe (drivers/base/dd.c:583 drivers/base/dd.c:661)
[ 7.116833] __driver_probe_device (drivers/base/dd.c:803)
[ 7.121199] driver_probe_device (drivers/base/dd.c:833)
[ 7.125385] __device_attach_driver (drivers/base/dd.c:962)
[ 7.129831] bus_for_each_drv (drivers/base/bus.c:500)
[ 7.133663] __device_attach (drivers/base/dd.c:1035)
[ 7.137494] device_initial_probe (drivers/base/dd.c:1088)
[ 7.141671] bus_probe_device (drivers/base/bus.c:576)
[ 7.145502] deferred_probe_work_func (drivers/base/dd.c:125 (discriminator 14))
[ 7.150035] process_one_work (kernel/workqueue.c:3286)
[ 7.154047] worker_thread (kernel/workqueue.c:3352 kernel/workqueue.c:3439)
[ 7.157791] kthread (kernel/kthread.c:467)
[ 7.161030] ret_from_fork (arch/arm64/kernel/entry.S:861)
[ 7.164610] ---[ end trace 0000000000000000 ]---

Best regards,

Franz