]> err.no Git - linux-2.6/commitdiff
[SCSI] lpfc 8.1.7: Issue DOWN_LINK prior to INIT_LINK to work around link failure...
authorJames Smart <James.Smart@Emulex.Com>
Thu, 6 Jul 2006 19:49:49 +0000 (15:49 -0400)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Sun, 9 Jul 2006 15:21:00 +0000 (10:21 -0500)
Issue DOWN_LINK prior to INIT_LINK to work around link failure issue

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/lpfc/lpfc_attr.c

index b62a72dfab296f46991abe51a9a3105f7358e597..511de17a1f839932c4c9afc3155a97831b1da96d 100644 (file)
@@ -219,9 +219,19 @@ lpfc_issue_lip(struct Scsi_Host *host)
                return -ENOMEM;
 
        memset((void *)pmboxq, 0, sizeof (LPFC_MBOXQ_t));
-       lpfc_init_link(phba, pmboxq, phba->cfg_topology, phba->cfg_link_speed);
+       pmboxq->mb.mbxCommand = MBX_DOWN_LINK;
+       pmboxq->mb.mbxOwner = OWN_HOST;
+
        mbxstatus = lpfc_sli_issue_mbox_wait(phba, pmboxq, phba->fc_ratov * 2);
 
+       if ((mbxstatus == MBX_SUCCESS) && (pmboxq->mb.mbxStatus == 0)) {
+               memset((void *)pmboxq, 0, sizeof (LPFC_MBOXQ_t));
+               lpfc_init_link(phba, pmboxq, phba->cfg_topology,
+                              phba->cfg_link_speed);
+               mbxstatus = lpfc_sli_issue_mbox_wait(phba, pmboxq,
+                                                    phba->fc_ratov * 2);
+       }
+
        if (mbxstatus == MBX_TIMEOUT)
                pmboxq->mbox_cmpl = lpfc_sli_def_mbox_cmpl;
        else