Commit d7069f09 authored by James Smart's avatar James Smart Committed by James Bottomley

[SCSI] lpfc 8.3.30: Fixed the system panic during EEH recovery

Signed-off-by: default avatarAlex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: default avatarJames Smart <james.smart@emulex.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent 0a8a86fa
...@@ -7252,11 +7252,13 @@ lpfc_sli4_post_async_mbox(struct lpfc_hba *phba) ...@@ -7252,11 +7252,13 @@ lpfc_sli4_post_async_mbox(struct lpfc_hba *phba)
out_not_finished: out_not_finished:
spin_lock_irqsave(&phba->hbalock, iflags); spin_lock_irqsave(&phba->hbalock, iflags);
mboxq->u.mb.mbxStatus = MBX_NOT_FINISHED; if (phba->sli.mbox_active) {
__lpfc_mbox_cmpl_put(phba, mboxq); mboxq->u.mb.mbxStatus = MBX_NOT_FINISHED;
/* Release the token */ __lpfc_mbox_cmpl_put(phba, mboxq);
psli->sli_flag &= ~LPFC_SLI_MBOX_ACTIVE; /* Release the token */
phba->sli.mbox_active = NULL; psli->sli_flag &= ~LPFC_SLI_MBOX_ACTIVE;
phba->sli.mbox_active = NULL;
}
spin_unlock_irqrestore(&phba->hbalock, iflags); spin_unlock_irqrestore(&phba->hbalock, iflags);
return MBX_NOT_FINISHED; return MBX_NOT_FINISHED;
...@@ -9818,12 +9820,11 @@ lpfc_sli_mbox_sys_shutdown(struct lpfc_hba *phba) ...@@ -9818,12 +9820,11 @@ lpfc_sli_mbox_sys_shutdown(struct lpfc_hba *phba)
unsigned long timeout; unsigned long timeout;
timeout = msecs_to_jiffies(LPFC_MBOX_TMO * 1000) + jiffies; timeout = msecs_to_jiffies(LPFC_MBOX_TMO * 1000) + jiffies;
spin_lock_irq(&phba->hbalock); spin_lock_irq(&phba->hbalock);
psli->sli_flag |= LPFC_SLI_ASYNC_MBX_BLK; psli->sli_flag |= LPFC_SLI_ASYNC_MBX_BLK;
spin_unlock_irq(&phba->hbalock);
if (psli->sli_flag & LPFC_SLI_ACTIVE) { if (psli->sli_flag & LPFC_SLI_ACTIVE) {
spin_lock_irq(&phba->hbalock);
/* Determine how long we might wait for the active mailbox /* Determine how long we might wait for the active mailbox
* command to be gracefully completed by firmware. * command to be gracefully completed by firmware.
*/ */
...@@ -9842,7 +9843,9 @@ lpfc_sli_mbox_sys_shutdown(struct lpfc_hba *phba) ...@@ -9842,7 +9843,9 @@ lpfc_sli_mbox_sys_shutdown(struct lpfc_hba *phba)
*/ */
break; break;
} }
} } else
spin_unlock_irq(&phba->hbalock);
lpfc_sli_mbox_sys_flush(phba); lpfc_sli_mbox_sys_flush(phba);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment