mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-07-08 18:13:59 +02:00
ce88eef705
This fixes an issue caused by the use of msleep during spinlock.
In the original commit, msleep was changed to mdelay, but this fix was not
carried over during the backport to 5.10.y tree.
This is a backporting error, so no fix is needed in the upstream.
```
[ 62.677594] BUG: scheduling while atomic: kworker/1:2/126/0x00000002
[ 62.683957] Modules linked in:
[ 62.687014] CPU: 1 PID: 126 Comm: kworker/1:2 Not tainted 5.10.253 #1
[ 62.693447] Hardware name: HopeRun HiHope RZ/G2M with sub board (DT)
[ 62.699812] Workqueue: events deferred_probe_work_func
[ 62.704948] Call trace:
[ 62.707397] dump_backtrace+0x0/0x1c0
[ 62.711058] show_stack+0x18/0x40
[ 62.714375] dump_stack+0xe8/0x124
[ 62.717776] __schedule_bug+0x54/0x70
[ 62.721436] __schedule+0x6b4/0x710
[ 62.724920] schedule+0x70/0x104
[ 62.728145] schedule_timeout+0x80/0xf0
[ 62.728153] msleep+0x30/0x44
[ 62.728165] rcar_gen3_phy_usb2_init+0x180/0x1e0
[ 62.736946] phy_init+0x64/0x100
[ 62.736955] usb_phy_roothub_init+0x48/0xa0
[ 62.736962] usb_add_hcd+0x54/0x6c0
[ 62.736974] ehci_platform_probe+0x1ec/0x4b0
[ 62.744541] platform_drv_probe+0x54/0xac
[ 62.744548] really_probe+0xec/0x4f0
[ 62.744552] driver_probe_device+0x58/0xec
[ 62.744556] __device_attach_driver+0xb8/0x120
[ 62.744562] bus_for_each_drv+0x78/0xd0
[ 62.744568] __device_attach+0xa8/0x1c0
[ 62.744575] device_initial_probe+0x14/0x20
[ 62.752315] bus_probe_device+0x9c/0xa4
[ 62.752319] deferred_probe_work_func+0x88/0xc0
[ 62.752327] process_one_work+0x1cc/0x370
[ 62.759977] worker_thread+0x218/0x480
[ 62.759984] kthread+0x154/0x160
[ 62.759990] ret_from_fork+0x10/0x18
[ 62.760115] ehci-platform ee080100.usb: EHCI Host Controller
[ 62.839982] ehci-platform ee080100.usb: new USB bus registered, assigned bus number 3
```
Fixes: 0f86a55990 ("phy: renesas: rcar-gen3-usb2: Lock around hardware registers and driver data")
Cc: stable@vger.kernel.org
Cc: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Cc: Sasha Levin <sashal@kernel.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>