aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Smart <james.smart@emulex.com>2012-03-01 22:36:29 -0500
committerJames Bottomley <JBottomley@Parallels.com>2012-03-27 03:26:31 -0400
commitd7069f09884ac3924dacaabbc769cc0b4ee6ad40 (patch)
tree0ed3795aaaa22c47200f36197597578003d3b146
parent0a8a86facf359147b2d3ef796496a09b21984b03 (diff)
[SCSI] lpfc 8.3.30: Fixed the system panic during EEH recovery
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 421e0a36041c..8945ac04277a 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -7252,11 +7252,13 @@ lpfc_sli4_post_async_mbox(struct lpfc_hba *phba)
7252 7252
7253out_not_finished: 7253out_not_finished:
7254 spin_lock_irqsave(&phba->hbalock, iflags); 7254 spin_lock_irqsave(&phba->hbalock, iflags);
7255 mboxq->u.mb.mbxStatus = MBX_NOT_FINISHED; 7255 if (phba->sli.mbox_active) {
7256 __lpfc_mbox_cmpl_put(phba, mboxq); 7256 mboxq->u.mb.mbxStatus = MBX_NOT_FINISHED;
7257 /* Release the token */ 7257 __lpfc_mbox_cmpl_put(phba, mboxq);
7258 psli->sli_flag &= ~LPFC_SLI_MBOX_ACTIVE; 7258 /* Release the token */
7259 phba->sli.mbox_active = NULL; 7259 psli->sli_flag &= ~LPFC_SLI_MBOX_ACTIVE;
7260 phba->sli.mbox_active = NULL;
7261 }
7260 spin_unlock_irqrestore(&phba->hbalock, iflags); 7262 spin_unlock_irqrestore(&phba->hbalock, iflags);
7261 7263
7262 return MBX_NOT_FINISHED; 7264 return MBX_NOT_FINISHED;
@@ -9818,12 +9820,11 @@ lpfc_sli_mbox_sys_shutdown(struct lpfc_hba *phba)
9818 unsigned long timeout; 9820 unsigned long timeout;
9819 9821
9820 timeout = msecs_to_jiffies(LPFC_MBOX_TMO * 1000) + jiffies; 9822 timeout = msecs_to_jiffies(LPFC_MBOX_TMO * 1000) + jiffies;
9823
9821 spin_lock_irq(&phba->hbalock); 9824 spin_lock_irq(&phba->hbalock);
9822 psli->sli_flag |= LPFC_SLI_ASYNC_MBX_BLK; 9825 psli->sli_flag |= LPFC_SLI_ASYNC_MBX_BLK;
9823 spin_unlock_irq(&phba->hbalock);
9824 9826
9825 if (psli->sli_flag & LPFC_SLI_ACTIVE) { 9827 if (psli->sli_flag & LPFC_SLI_ACTIVE) {
9826 spin_lock_irq(&phba->hbalock);
9827 /* Determine how long we might wait for the active mailbox 9828 /* Determine how long we might wait for the active mailbox
9828 * command to be gracefully completed by firmware. 9829 * command to be gracefully completed by firmware.
9829 */ 9830 */
@@ -9842,7 +9843,9 @@ lpfc_sli_mbox_sys_shutdown(struct lpfc_hba *phba)
9842 */ 9843 */
9843 break; 9844 break;
9844 } 9845 }
9845 } 9846 } else
9847 spin_unlock_irq(&phba->hbalock);
9848
9846 lpfc_sli_mbox_sys_flush(phba); 9849 lpfc_sli_mbox_sys_flush(phba);
9847} 9850}
9848 9851