scsi: ufs-qcom: Skip getting fsm state in dme context

Getting fsm state needs a dme command.
It'd lead to a deadlock if timeout of dme command
leads to dumping of fsm state which would again try to acquire
the uic_cmd_mutex.

Change-Id: I04ad7b6eececd085189ddc59154fc81e68874dc3
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
This commit is contained in:
Asutosh Das 2020-07-23 11:45:24 -07:00
commit bdd3b389ad

View file

@ -3079,6 +3079,14 @@ static void ufs_qcom_print_utp_hci_testbus(struct ufs_hba *hba)
static void ufshcd_print_fsm_state(struct ufs_hba *hba)
{
int err = 0, tx_fsm_val = 0, rx_fsm_val = 0;
unsigned long flags;
spin_lock_irqsave(hba->host->host_lock, flags);
if (hba->active_uic_cmd) {
spin_unlock_irqrestore(hba->host->host_lock, flags);
return;
}
spin_unlock_irqrestore(hba->host->host_lock, flags);
err = ufshcd_dme_get(hba,
UIC_ARG_MIB_SEL(MPHY_TX_FSM_STATE,