Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 32735
b: refs/heads/master
c: ce8b3ce
h: refs/heads/master
i:
  32733: cadaa29
  32731: 155d647
  32727: 5dcc1a7
  32719: 01446fb
  32703: b0becf9
v: v3
  • Loading branch information
James Smart authored and James Bottomley committed Jul 9, 2006
1 parent 5cd4247 commit 061ea91
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 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: 5e0b43385559bfe78c1f80d71ec203effe244d9a
refs/heads/master: ce8b3ce55bb0bd9318954efab0f714b088178978
24 changes: 14 additions & 10 deletions trunk/drivers/scsi/lpfc/lpfc_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,32 +405,34 @@ lpfc_config_port_post(struct lpfc_hba * phba)
}
/* MBOX buffer will be freed in mbox compl */

i = 0;
return (0);
}

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

while ((phba->hba_state != LPFC_HBA_READY) ||
(phba->num_disc_nodes) || (phba->fc_prli_sent) ||
((phba->fc_map_cnt == 0) && (i<2)) ||
(psli->sli_flag & LPFC_SLI_MBOX_ACTIVE)) {
(phba->sli.sli_flag & LPFC_SLI_MBOX_ACTIVE)) {
/* Check every second for 30 retries. */
i++;
if (i > 30) {
break;
return -ETIMEDOUT;
}
if ((i >= 15) && (phba->hba_state <= LPFC_LINK_DOWN)) {
/* The link is down. Set linkdown timeout */
break;
return -ETIMEDOUT;
}

/* Delay for 1 second to give discovery time to complete. */
msleep(1000);

}

/* Since num_disc_nodes keys off of PLOGI, delay a bit to let
* any potential PRLIs to flush thru the SLI sub-system.
*/
msleep(50);

return (0);
return 0;
}

/************************************************************************/
Expand Down Expand Up @@ -1649,6 +1651,8 @@ lpfc_pci_probe_one(struct pci_dev *pdev, const struct pci_device_id *pid)
goto out_free_irq;
}

lpfc_discovery_wait(phba);

if (phba->cfg_poll & DISABLE_FCP_RING_INT) {
spin_lock_irq(phba->host->host_lock);
lpfc_poll_start_timer(phba);
Expand Down

0 comments on commit 061ea91

Please sign in to comment.