]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
Fix bug with mailbox handling of REG_VFI and cable pull (CR 127762)
authorVaios Papadimitriou <vaios.papadimitriou@emulex.com>
Tue, 8 May 2012 22:01:28 +0000 (17:01 -0500)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Wed, 9 May 2012 00:01:28 +0000 (17:01 -0700)
Additional checks were missing for interface type and mailbox status that
caused the vport state to be set as failed.

commit id: f5eca9be1424ffa76b36dce4a821c051b37a8ab9

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
drivers/scsi/lpfc/lpfc_hbadisc.c

index e6daaa6b06ef6b2207bf0dcc40d7f53226d1cf26..ac31b6e89420ede6a6c54723786b8ae62ffb6347 100644 (file)
@@ -2843,7 +2843,14 @@ lpfc_mbx_cmpl_reg_vfi(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq)
        struct lpfc_vport *vport = mboxq->vport;
        struct Scsi_Host *shost = lpfc_shost_from_vport(vport);
 
-       if (mboxq->u.mb.mbxStatus) {
+       /*
+        * VFI not supported for interface type 0, so ignore any mailbox
+        * error (except VFI in use) and continue with the discovery.
+        */
+       if (mboxq->u.mb.mbxStatus &&
+           (bf_get(lpfc_sli_intf_if_type, &phba->sli4_hba.sli_intf) !=
+                       LPFC_SLI_INTF_IF_TYPE_0) &&
+           mboxq->u.mb.mbxStatus != MBX_VFI_IN_USE) {
                lpfc_printf_vlog(vport, KERN_ERR, LOG_MBOX,
                         "2018 REG_VFI mbxStatus error x%x "
                         "HBA state x%x\n",