Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 32736
b: refs/heads/master
c: b4c0265
h: refs/heads/master
v: v3
  • Loading branch information
James Smart authored and James Bottomley committed Jul 9, 2006
1 parent 061ea91 commit 560bf31
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 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: ce8b3ce55bb0bd9318954efab0f714b088178978
refs/heads/master: b4c026520ff0a4cb838a941bb0ed8996075e3d8c
1 change: 1 addition & 0 deletions trunk/drivers/scsi/lpfc/lpfc_crtn.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ int lpfc_sli_hba_setup(struct lpfc_hba *);
int lpfc_sli_hba_down(struct lpfc_hba *);
int lpfc_sli_issue_mbox(struct lpfc_hba *, LPFC_MBOXQ_t *, uint32_t);
int lpfc_sli_handle_mb_event(struct lpfc_hba *);
int lpfc_sli_flush_mbox_queue(struct lpfc_hba *);
int lpfc_sli_handle_slow_ring_event(struct lpfc_hba *,
struct lpfc_sli_ring *, uint32_t);
void lpfc_sli_def_mbox_cmpl(struct lpfc_hba *, LPFC_MBOXQ_t *);
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/scsi/lpfc/lpfc_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1353,6 +1353,7 @@ lpfc_offline(struct lpfc_hba * phba)
psli = &phba->sli;

lpfc_linkdown(phba);
lpfc_sli_flush_mbox_queue(phba);

for (i = 0; i < psli->num_rings; i++) {
pring = &psli->ring[i];
Expand Down
20 changes: 19 additions & 1 deletion trunk/drivers/scsi/lpfc/lpfc_sli.c
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ lpfc_sli_handle_mb_event(struct lpfc_hba * phba)
/* Stray Mailbox Interrupt, mbxCommand <cmd> mbxStatus
<status> */
lpfc_printf_log(phba,
KERN_ERR,
KERN_WARNING,
LOG_MBOX | LOG_SLI,
"%d:0304 Stray Mailbox Interrupt "
"mbxCommand x%x mbxStatus x%x\n",
Expand Down Expand Up @@ -3085,6 +3085,24 @@ lpfc_sli_issue_mbox_wait(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmboxq,
return retval;
}

int
lpfc_sli_flush_mbox_queue(struct lpfc_hba * phba)
{
int i = 0;

while (phba->sli.sli_flag & LPFC_SLI_MBOX_ACTIVE && !phba->stopped) {
if (i++ > LPFC_MBOX_TMO * 1000)
return 1;

if (lpfc_sli_handle_mb_event(phba) == 0)
i = 0;

msleep(1);
}

return (phba->sli.sli_flag & LPFC_SLI_MBOX_ACTIVE) ? 1 : 0;
}

irqreturn_t
lpfc_intr_handler(int irq, void *dev_id, struct pt_regs * regs)
{
Expand Down

0 comments on commit 560bf31

Please sign in to comment.