* [PATCH 6/15] lpfc 8.1.7 : Fix txcmplq related panics on heavy IO while downloading firmware
@ 2006-07-06 19:49 James Smart
0 siblings, 0 replies; only message in thread
From: James Smart @ 2006-07-06 19:49 UTC (permalink / raw)
To: linux-scsi
Fix txcmplq related panics on heavy IO while downloading firmware
Signed-off-by: James Smart <James.Smart@emulex.com>
diff -upNr a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
--- a/drivers/scsi/lpfc/lpfc_init.c 2006-07-05 14:49:02.000000000 -0400
+++ b/drivers/scsi/lpfc/lpfc_init.c 2006-07-06 14:50:59.000000000 -0400
@@ -1339,7 +1339,8 @@ lpfc_offline(struct lpfc_hba * phba)
struct lpfc_sli_ring *pring;
struct lpfc_sli *psli;
unsigned long iflag;
- int i = 0;
+ int i;
+ int cnt = 0;
if (!phba)
return 0;
@@ -1348,17 +1349,26 @@ lpfc_offline(struct lpfc_hba * phba)
return 0;
psli = &phba->sli;
- pring = &psli->ring[psli->fcp_ring];
lpfc_linkdown(phba);
- /* The linkdown event takes 30 seconds to timeout. */
- while (pring->txcmplq_cnt) {
- mdelay(10);
- if (i++ > 3000)
- break;
+ for (i = 0; i < psli->num_rings; i++) {
+ pring = &psli->ring[i];
+ /* The linkdown event takes 30 seconds to timeout. */
+ while (pring->txcmplq_cnt) {
+ 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 */
lpfc_stop_timer(phba);
phba->work_hba_events = 0;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-07-06 19:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-06 19:49 [PATCH 6/15] lpfc 8.1.7 : Fix txcmplq related panics on heavy IO while downloading firmware James Smart
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox