Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b1af46cf authored by Venkat Gopalakrishnan's avatar Venkat Gopalakrishnan
Browse files

scsi: ufs: fix sleep in atomic context



Make sure spin lock is released before calling print host regs,
as that call sleeps while dumping lots of registers.

Change-Id: I171c91e700c24ecc213ccda705bbe6188d22a43a
Signed-off-by: default avatarVenkat Gopalakrishnan <venkatg@codeaurora.org>
parent 758693b4
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -5696,10 +5696,13 @@ static void ufshcd_err_handler(struct work_struct *work)
		dev_err(hba->dev, "%s: saved_err 0x%x saved_uic_err 0x%x",
			__func__, hba->saved_err, hba->saved_uic_err);
		if (!hba->silence_err_logs) {
			/* release lock as print host regs sleeps */
			spin_unlock_irqrestore(hba->host->host_lock, flags);
			ufshcd_print_host_regs(hba);
			ufshcd_print_host_state(hba);
			ufshcd_print_pwr_info(hba);
			ufshcd_print_tmrs(hba, hba->outstanding_tasks);
			spin_lock_irqsave(hba->host->host_lock, flags);
		}
	}