Commit 688a8863 authored by James Smart's avatar James Smart Committed by James Bottomley

[SCSI] lpfc 8.1.7: Fix txcmplq related panics on heavy IO while downloading firmware

Fix txcmplq related panics on heavy IO while downloading firmware
Signed-off-by: default avatarJames Smart <James.Smart@emulex.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 4db621e0
...@@ -1339,7 +1339,8 @@ lpfc_offline(struct lpfc_hba * phba) ...@@ -1339,7 +1339,8 @@ lpfc_offline(struct lpfc_hba * phba)
struct lpfc_sli_ring *pring; struct lpfc_sli_ring *pring;
struct lpfc_sli *psli; struct lpfc_sli *psli;
unsigned long iflag; unsigned long iflag;
int i = 0; int i;
int cnt = 0;
if (!phba) if (!phba)
return 0; return 0;
...@@ -1348,17 +1349,26 @@ lpfc_offline(struct lpfc_hba * phba) ...@@ -1348,17 +1349,26 @@ lpfc_offline(struct lpfc_hba * phba)
return 0; return 0;
psli = &phba->sli; psli = &phba->sli;
pring = &psli->ring[psli->fcp_ring];
lpfc_linkdown(phba); lpfc_linkdown(phba);
/* The linkdown event takes 30 seconds to timeout. */ for (i = 0; i < psli->num_rings; i++) {
while (pring->txcmplq_cnt) { pring = &psli->ring[i];
mdelay(10); /* The linkdown event takes 30 seconds to timeout. */
if (i++ > 3000) while (pring->txcmplq_cnt) {
break; mdelay(10);
if (cnt++ > 3000) {
lpfc_printf_log(phba,
KERN_WARNING, LOG_INIT,
"%d:0466 Outstanding IO when "
"bringing Adapter offline\n",
phba->brd_no);
break;
}
}
} }
/* stop all timers associated with this hba */ /* stop all timers associated with this hba */
lpfc_stop_timer(phba); lpfc_stop_timer(phba);
phba->work_hba_events = 0; phba->work_hba_events = 0;
......
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