aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorJames Smart <James.Smart@Emulex.Com>2006-07-06 15:49:56 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-07-09 11:21:28 -0400
commit688a88635f9d0d9251d35198e931eaac8816abef (patch)
treea7a78fee8bfb6bf1552484235be17ce406d76b70 /drivers/scsi
parent4db621e0f3817e14c79513b42c0479d44d8467de (diff)
[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: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/lpfc/lpfc_init.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 81755a3f7c68..2944eda1e907 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -1339,7 +1339,8 @@ lpfc_offline(struct lpfc_hba * phba)
1339 struct lpfc_sli_ring *pring; 1339 struct lpfc_sli_ring *pring;
1340 struct lpfc_sli *psli; 1340 struct lpfc_sli *psli;
1341 unsigned long iflag; 1341 unsigned long iflag;
1342 int i = 0; 1342 int i;
1343 int cnt = 0;
1343 1344
1344 if (!phba) 1345 if (!phba)
1345 return 0; 1346 return 0;
@@ -1348,17 +1349,26 @@ lpfc_offline(struct lpfc_hba * phba)
1348 return 0; 1349 return 0;
1349 1350
1350 psli = &phba->sli; 1351 psli = &phba->sli;
1351 pring = &psli->ring[psli->fcp_ring];
1352 1352
1353 lpfc_linkdown(phba); 1353 lpfc_linkdown(phba);
1354 1354
1355 /* The linkdown event takes 30 seconds to timeout. */ 1355 for (i = 0; i < psli->num_rings; i++) {
1356 while (pring->txcmplq_cnt) { 1356 pring = &psli->ring[i];
1357 mdelay(10); 1357 /* The linkdown event takes 30 seconds to timeout. */
1358 if (i++ > 3000) 1358 while (pring->txcmplq_cnt) {
1359 break; 1359 mdelay(10);
1360 if (cnt++ > 3000) {
1361 lpfc_printf_log(phba,
1362 KERN_WARNING, LOG_INIT,
1363 "%d:0466 Outstanding IO when "
1364 "bringing Adapter offline\n",
1365 phba->brd_no);
1366 break;
1367 }
1368 }
1360 } 1369 }
1361 1370
1371
1362 /* stop all timers associated with this hba */ 1372 /* stop all timers associated with this hba */
1363 lpfc_stop_timer(phba); 1373 lpfc_stop_timer(phba);
1364 phba->work_hba_events = 0; 1374 phba->work_hba_events = 0;