Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 32729
b: refs/heads/master
c: 688a886
h: refs/heads/master
i:
  32727: 5dcc1a7
v: v3
  • Loading branch information
James Smart authored and James Bottomley committed Jul 9, 2006
1 parent 02870c8 commit 8137c33
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4db621e0f3817e14c79513b42c0479d44d8467de
refs/heads/master: 688a88635f9d0d9251d35198e931eaac8816abef
24 changes: 17 additions & 7 deletions trunk/drivers/scsi/lpfc/lpfc_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 8137c33

Please sign in to comment.