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: Venkat Gopalakrishnan <venkatg@codeaurora.org>
This commit is contained in:
Venkat Gopalakrishnan 2016-11-04 12:27:07 -07:00
parent 758693b4a6
commit b1af46cf1a

View file

@ -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);
}
}