Subject: Regression: scsi: ufs: core: Avoid IRQ thread wakeup during active UIC command

From: Tj <[email-masked]>
Date: Tue, 17 Mar 2026 17:17:46 +0000

#regzbot ^introduced: 6475cfb81fc4f6175b6d15d1c205a5168dc10b46

I've had to revert this commit because it breaks UFS on Samsung Book2
W737 sdm850. Below is transcribed from a blurry video so apologies if it
is not exact:

| BUG: Invalid wait context |
ufshcd-qcom 1d84000.ufshc: uic cmd 0x1 with arg3 0x0 completion timeout
7.0.0-rc3-next-202603110sdm845 #103 Not tainted
-----------------------------
ufshcd-qcom 1d84000.ufshc: dme-get: attr-id 0x41 failed 0 retries
swapper/0/0 is trying to lock:
ffff000087ba4048 (shost->host_lock)(....)-(3:3). at: ufshcd_sl_intr+0x3dc/0x7a0
other info that might help us debug this:
ufshcd-qcom 1d84000.ufshc: uic cmd 0x1 with arg3 0x0 completion timeout
context-(2:2)
ufshcd-qcom 1d84000.ufshc: dme-get: sttr-id 0x41 failed 0 retries
no locks held by swapper/0/0.
ufshcd-qcom 1d84000.ufshc: ufs_wcom_check_hibern8: unable to get TX_FSM_STATE, err -110
stack backtrace:
CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted 7.0.0-rc3-next-20260311-sdm845 #103 PREEMPTLAZY ...${unclear}
Hardware name: SAMSUNG ELECTRONICS CO,. LTD. Galaxy Book2/SM-W737YZSBTEL, BIOS P02AHG.005.190624.WY.1359 06/24/2019
Call trace:
  show_stack+
  dump_stack_lvl
  dump_stack
ufshcd-qcom 1d84000.ufshc: uic cmd 0x1 with arg3 0x0 completion timeout
  __lock_acquire
  lock_acquire
  _raw_spin_lock_irqsave
  ufshcd_sl_intr
  ufshcd_intr
  __handle_irq_event_percpu
  handle_irq_event
  handle_fast???_irq
ufshcd-qcom 1d84000.ufshc: dme-get: attr-id 0xa00b failed 0 retries
  handle_irq_desc
  generic_handle_domain_irq
  gic_handle_irq
  do_interrupt_handler
ufshcd-qcom 1d84000.ufshc: hw clk gating enabled failed
  el1_interrupt
  el1h_64_irq_handler
  el1h_64_irq
scsi host0: ufshcd
  handle_softirqs
  __do_softirq
  ___do_softirq
  do_softirq_own_stack
  __irq_exit_rcn
  irq_exit_rcn
ufshcd-qcom 1d84000.ufshc: uic cmd 0x1 with arg3 0x0 completion timeout
  el1_interrupt
  el1h_64_irq_handler
  el1h_64_irq
  cpuidle_enter_state
  cpuidle_enter
  do_idle
  cpu_startup_entry
  rest_init
  start_kernel
  __primary_switched
ufshcd-qcom 1d84000.ufshc: cfg core clk ctrl failed
ufshcd-qcom 1d84000.ufshc: No active UIC command. Maybe a timeout occurred?
ufshcd-qcom 1d84000.ufshc: No active UIC command. Maybe a timeout occurred?
ufshcd-qcom 1d84000.ufshc: ufshcd_threaded_intr: Unhadled interrupt 0x00000000 (0x00000400, 0x00000400)