mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
scsi: ufs: Clear uic_cmd->cmd_active before calling complete()
Previously, uic_cmd->cmd_active is cleared after completion has been raised so that we can tell completion timeout happened due to kernel scheduling, which is for debugging purposes. It is more important, however, to increase the chance that UIC cmd survives from a completion timeout. So, this change clears uic_cmd->cmd_active before calling complete(). Change-Id: I99254ac4e3b16dc6b905b5ed5248d53f9c9fc3af Signed-off-by: Can Guo <cang@codeaurora.org>
This commit is contained in:
parent
4027c201fd
commit
820e10e820
1 changed files with 3 additions and 2 deletions
|
|
@ -5079,15 +5079,16 @@ static irqreturn_t ufshcd_uic_cmd_compl(struct ufs_hba *hba, u32 intr_status)
|
|||
ufshcd_get_uic_cmd_result(hba);
|
||||
hba->active_uic_cmd->argument3 =
|
||||
ufshcd_get_dme_attr_val(hba);
|
||||
complete(&hba->active_uic_cmd->done);
|
||||
if (!hba->uic_async_done)
|
||||
hba->active_uic_cmd->cmd_active = 0;
|
||||
complete(&hba->active_uic_cmd->done);
|
||||
retval = IRQ_HANDLED;
|
||||
}
|
||||
|
||||
if ((intr_status & UFSHCD_UIC_PWR_MASK) && hba->uic_async_done) {
|
||||
if (hba->active_uic_cmd)
|
||||
hba->active_uic_cmd->cmd_active = 0;
|
||||
complete(hba->uic_async_done);
|
||||
hba->active_uic_cmd->cmd_active = 0;
|
||||
retval = IRQ_HANDLED;
|
||||
}
|
||||
return retval;
|
||||
|
|
|
|||
Loading…
Reference in a new issue