Li Jun
dc336b19e8
usb: dwc3: core: do not queue work if dr_mode is not USB_DR_MODE_OTG
Do not try to queue a drd work if dr_mode is not USB_DR_MODE_OTG
because the work is not inited, this may be triggered by user try
to change mode file of debugfs on a single role port, which will
cause below kernel dump:
[ 60.115529] ------------[ cut here ]------------
[ 60.120166] WARNING: CPU: 1 PID: 627 at kernel/workqueue.c:1473
__queue_work+0x46c/0x520
[ 60.128254] Modules linked in:
[ 60.131313] CPU: 1 PID: 627 Comm: sh Not tainted
5.7.0-rc4-00022-g914a586-dirty #135
[ 60.139054] Hardware name: NXP i.MX8MQ EVK (DT)
[ 60.143585] pstate: a0000085 (NzCv daIf -PAN -UAO)
[ 60.148376] pc : __queue_work+0x46c/0x520
[ 60.152385] lr : __queue_work+0x314/0x520
[ 60.156393] sp : ffff8000124ebc40
[ 60.159705] x29: ffff8000124ebc40 x28: ffff800011808018
[ 60.165018] x27: ffff800011819ef8 x26: ffff800011d39980
[ 60.170331] x25: ffff800011808018 x24: 0000000000000100
[ 60.175643] x23: 0000000000000013 x22: 0000000000000001
[ 60.180955] x21: ffff0000b7c08e00 x20: ffff0000b6c31080
[ 60.186267] x19: ffff0000bb99bc00 x18: 0000000000000000
[ 60.191579] x17: 0000000000000000 x16: 0000000000000000
[ 60.196891] x15: 0000000000000000 x14: 0000000000000000
[ 60.202202] x13: 0000000000000000 x12: 0000000000000000
[ 60.207515] x11: 0000000000000000 x10: 0000000000000040
[ 60.212827] x9 : ffff800011d55460 x8 : ffff800011d55458
[ 60.218138] x7 : ffff0000b7800028 x6 : 0000000000000000
[ 60.223450] x5 : ffff0000b7800000 x4 : 0000000000000000
[ 60.228762] x3 : ffff0000bb997cc0 x2 : 0000000000000001
[ 60.234074] x1 : 0000000000000000 x0 : ffff0000b6c31088
[ 60.239386] Call trace:
[ 60.241834] __queue_work+0x46c/0x520
[ 60.245496] queue_work_on+0x6c/0x90
[ 60.249075] dwc3_set_mode+0x48/0x58
[ 60.252651] dwc3_mode_write+0xf8/0x150
[ 60.256489] full_proxy_write+0x5c/0xa8
[ 60.260327] __vfs_write+0x18/0x40
[ 60.263729] vfs_write+0xdc/0x1c8
[ 60.267045] ksys_write+0x68/0xf0
[ 60.270360] __arm64_sys_write+0x18/0x20
[ 60.274286] el0_svc_common.constprop.0+0x68/0x160
[ 60.279077] do_el0_svc+0x20/0x80
[ 60.282394] el0_sync_handler+0x10c/0x178
[ 60.286403] el0_sync+0x140/0x180
[ 60.289716] ---[ end trace 70b155582e2b7988 ]---
Signed-off-by: Li Jun <jun.li@nxp.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
2020-10-02 09:43:36 +03:00
..
2020-08-26 10:50:50 -07:00
2020-09-16 19:36:26 +02:00
2020-07-29 17:05:44 +02:00
2020-09-04 13:19:19 -07:00
2020-09-03 18:50:48 -07:00
2020-09-05 14:22:46 -07:00
2020-09-13 09:02:59 -07:00
2020-08-02 18:26:51 +03:00
2020-09-07 13:14:30 +02:00
2020-07-31 15:11:52 -07:00
2020-08-23 17:36:59 -05:00
2020-08-30 15:53:44 -07:00
2020-09-10 13:42:35 -07:00
2020-09-20 10:51:11 -07:00
2020-08-22 11:38:42 +01:00
2020-09-01 21:15:00 +02:00
2020-09-18 11:48:25 -07:00
2020-08-30 15:53:44 -07:00
2020-09-20 08:57:36 -07:00
2020-07-30 17:22:58 +09:00
2020-09-04 12:12:39 -07:00
2020-09-03 17:47:02 +05:30
2020-09-15 09:42:15 +02:00
2020-08-23 17:36:59 -05:00
2020-09-20 15:18:11 -07:00
2020-07-27 11:49:37 +02:00
2020-08-23 17:36:59 -05:00
2020-09-18 08:52:06 +10:00
2020-07-29 16:58:08 +02:00
2020-09-02 12:55:46 -07:00
2020-08-23 17:36:59 -05:00
2020-09-15 16:20:43 -07:00
2020-08-29 12:37:00 -07:00
2020-08-23 17:36:59 -05:00
2020-09-18 23:11:44 +02:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2020-08-26 12:41:53 +02:00
2020-09-13 09:15:20 -07:00
2020-09-11 10:02:36 -07:00
2020-09-20 10:40:43 -07:00
2020-09-04 00:07:12 +03:00
2020-09-18 11:17:19 +02:00
2020-08-30 11:56:54 -07:00
2020-08-23 17:36:59 -05:00
2020-08-05 19:24:27 -07:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2020-08-14 19:56:57 -07:00
2020-09-20 08:55:09 -07:00
2020-09-03 08:22:16 -07:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2020-08-28 10:15:33 -07:00
2020-09-13 08:52:21 -07:00
2020-09-07 08:57:44 +02:00
2020-07-31 14:38:12 +02:00
2020-09-14 20:58:27 +05:30
2020-08-23 17:36:59 -05:00
2020-09-03 18:50:48 -07:00
2020-09-03 18:50:48 -07:00
2020-08-23 17:36:59 -05:00
2020-08-17 14:47:38 -06:00
2020-09-11 11:55:28 -07:00
2020-07-29 17:12:09 +02:00
2020-08-19 16:30:57 -06:00
2020-09-01 19:44:20 +02:00
2020-08-12 12:41:15 -07:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2020-09-04 12:41:55 +02:00
2020-08-09 12:52:28 -07:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2020-09-16 14:16:04 +02:00
2020-08-23 17:36:59 -05:00
2020-08-19 16:23:22 -07:00
2020-08-14 16:00:09 -07:00
2020-09-05 19:52:54 +03:00
2020-09-11 11:25:55 -07:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2020-09-14 10:08:07 +02:00
2020-09-15 16:30:20 -07:00
2020-08-14 19:56:57 -07:00
2020-08-23 17:36:59 -05:00
2020-09-03 14:10:19 +05:30
2020-09-11 11:35:55 -07:00
2020-08-23 17:36:59 -05:00
2020-09-13 09:15:20 -07:00
2020-09-08 11:42:58 -07:00
2020-09-04 12:49:03 -07:00
2020-09-15 13:52:14 +02:00
2020-09-16 13:23:33 +02:00
2020-10-02 09:43:36 +03:00
2020-08-26 08:13:59 -04:00
2020-08-23 17:36:59 -05:00
2020-09-03 18:50:48 -07:00
2020-09-20 10:46:26 -07:00
2020-08-14 19:56:57 -07:00
2020-08-23 17:36:59 -05:00
2020-09-06 09:59:27 -07:00