On 11/09/23 04:35, Kiwoong Kim wrote: >>> v2 -> v3: rule out the change of polling w/ pmc from this thread. >>> (I'll post the change later) >>> v1 -> v2: remove an unused variable in __ufshcd_send_uic_cmd >>> >>> Kiwoong Kim (2): >>> ufs: make __ufshcd_send_uic_cmd not wrapped by host_lock >>> ufs: poll HCS.UCRDY before issuing a UIC command >> >> Applied to 6.6/scsi-staging, thanks! >> >> -- >> Martin K. Petersen Oracle Linux Engineering > > Hi, Martin > > The following patch seems to make trouble because of using > read_poll_timeout. > Its initial version used udelay and after discussion it's been changed. > Could you revert this patch set? > >> ufs: poll HCS.UCRDY before issuing a UIC command > > [ 4671.226480] [3: kworker/u20:29:17140] BUG: scheduling while atomic: > kworker/u20:29/17140/0x00000002 > .. > [ 4671.228723] [3: kworker/u20:29:17140] panic+0x16c/0x388 > [ 4671.228745] [3: kworker/u20:29:17140] check_panic_on_warn+0x60/0x94 > [ 4671.228764] [3: kworker/u20:29:17140] __schedule_bug+0x6c/0x94 > [ 4671.228786] [3: kworker/u20:29:17140] __schedule+0x6f4/0xa64 > [ 4671.228806] [3: kworker/u20:29:17140] schedule+0x7c/0xe8 > [ 4671.228824] [3: kworker/u20:29:17140] > schedule_hrtimeout_range_clock+0x98/0x114 > [ 4671.228841] [3: kworker/u20:29:17140] schedule_hrtimeout_range+0x14/0x24 > [ 4671.228856] [3: kworker/u20:29:17140] usleep_range_state+0x60/0x94 > [ 4671.228871] [3: kworker/u20:29:17140] __ufshcd_send_uic_cmd+0xa0/0x1c4 > [ 4671.228893] [3: kworker/u20:29:17140] ufshcd_uic_pwr_ctrl+0x15c/0x390 > [ 4671.228908] [3: kworker/u20:29:17140] > ufshcd_uic_hibern8_enter+0x9c/0x25c > [ 4671.228922] [3: kworker/u20:29:17140] > ufshcd_link_state_transition+0x34/0xb0 > [ 4671.228939] [3: kworker/u20:29:17140] __ufshcd_wl_suspend+0x3f0/0x4b4 Do you know what is in that path that makes it an atomic context?