]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
scsi: lpfc: FLOGI failures are reported when connected to a private loop.
authorJames Smart <jsmart2021@gmail.com>
Tue, 21 Nov 2017 00:00:28 +0000 (16:00 -0800)
committerSeth Forshee <seth.forshee@canonical.com>
Fri, 16 Mar 2018 12:05:22 +0000 (07:05 -0500)
BugLink: http://bugs.launchpad.net/bugs/1752182
When the HBA is connected to a private loop, the driver reports FLOGI
loop-open failure as functional error. This is an expected condition.

Mark loop-open failure as a warning instead of error.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit c73455e1b5ef165aed82e36ae04e74a71d2d7d5b)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/scsi/lpfc/lpfc_els.c

index 39d5b146202ec6719b1c9433cc35876e59e56a38..3a405d35dd7e3ee75d1b80e800072da1abdf4bcb 100644 (file)
@@ -1030,30 +1030,31 @@ lpfc_cmpl_els_flogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
 
 stop_rr_fcf_flogi:
                /* FLOGI failure */
-               lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS,
-                               "2858 FLOGI failure Status:x%x/x%x TMO:x%x "
-                               "Data x%x x%x\n",
-                               irsp->ulpStatus, irsp->un.ulpWord[4],
-                               irsp->ulpTimeout, phba->hba_flag,
-                               phba->fcf.fcf_flag);
+               if (!(irsp->ulpStatus == IOSTAT_LOCAL_REJECT &&
+                     ((irsp->un.ulpWord[4] & IOERR_PARAM_MASK) ==
+                                       IOERR_LOOP_OPEN_FAILURE)))
+                       lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS,
+                                       "2858 FLOGI failure Status:x%x/x%x "
+                                       "TMO:x%x Data x%x x%x\n",
+                                       irsp->ulpStatus, irsp->un.ulpWord[4],
+                                       irsp->ulpTimeout, phba->hba_flag,
+                                       phba->fcf.fcf_flag);
 
                /* Check for retry */
                if (lpfc_els_retry(phba, cmdiocb, rspiocb))
                        goto out;
 
-               /* FLOGI failure */
-               lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS,
-                                "0100 FLOGI failure Status:x%x/x%x TMO:x%x\n",
-                                irsp->ulpStatus, irsp->un.ulpWord[4],
-                                irsp->ulpTimeout);
-
-
                /* If this is not a loop open failure, bail out */
                if (!(irsp->ulpStatus == IOSTAT_LOCAL_REJECT &&
                      ((irsp->un.ulpWord[4] & IOERR_PARAM_MASK) ==
                                        IOERR_LOOP_OPEN_FAILURE)))
                        goto flogifail;
 
+               lpfc_printf_vlog(vport, KERN_WARNING, LOG_ELS,
+                                "0150 FLOGI failure Status:x%x/x%x TMO:x%x\n",
+                                irsp->ulpStatus, irsp->un.ulpWord[4],
+                                irsp->ulpTimeout);
+
                /* FLOGI failed, so there is no fabric */
                spin_lock_irq(shost->host_lock);
                vport->fc_flag &= ~(FC_FABRIC | FC_PUBLIC_LOOP);