On Sat, Apr 20, 2024 at 10:38 PM Sergei Antonov <saproj@xxxxxxxxx> wrote: > [ 7.018270] BUG: scheduling while atomic: kworker/0:1/9/0x00000002 (...) > [ 7.057443] CPU: 0 PID: 9 Comm: kworker/0:1 Not tainted 6.8.0-rc4+ #225 > [ 7.064527] Hardware name: Generic DT based system > [ 7.069677] Workqueue: events_freezable mmc_rescan > [ 7.075121] unwind_backtrace from show_stack+0x10/0x14 > [ 7.080930] show_stack from dump_stack_lvl+0x34/0x44 > [ 7.086576] dump_stack_lvl from __schedule_bug+0x64/0x84 > [ 7.092608] __schedule_bug from __schedule+0x58/0x594 > [ 7.098320] __schedule from schedule+0x74/0xa8 > [ 7.103368] schedule from schedule_timeout+0xd4/0x108 > [ 7.109070] schedule_timeout from __wait_for_common+0x94/0x120 > [ 7.115547] __wait_for_common from moxart_request+0x278/0x468 > [ 7.121980] moxart_request from mmc_start_request+0x94/0xa8 moxart_transfer_pio() is called from the interrupt handler and should be properly atomic right, so the flags to sg_miter should be fine. The way I read it is that the completion does not arrive and that triggers a timeout, am I right? I assume increasing the timeout doesn't help. Could it be something like commit 4d4a2c71b862b9e696006fd264dbf5dbd6484d77 ? Yours, Linus Walleij