]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
scsi/lpfc: Fixed driver logging in area of SLI4 port error attention and reset recovery
authorVaios Papadimitriou <vaios.papadimitriou@emulex.com>
Tue, 28 Aug 2012 22:31:25 +0000 (15:31 -0700)
committerJerry Snitselaar <jerry.snitselaar@oracle.com>
Wed, 5 Sep 2012 19:25:39 +0000 (12:25 -0700)
commit id: 6b5151fd7baec6812fece993ddd7a2cf9fd0125f

Signed-off-by: Jerry Snitselaar <jerry.snitselaar@oracle.com>
drivers/scsi/lpfc/lpfc_attr.c
drivers/scsi/lpfc/lpfc_init.c

index e7a4370e202df367b53b581933c1dc9895540e35..d73c9277a84853efeb52ceecc52088fe73a798bc 100644 (file)
@@ -921,11 +921,15 @@ lpfc_sli4_pdev_reg_request(struct lpfc_hba *phba, uint32_t opcode)
        rc = lpfc_sli4_pdev_status_reg_wait(phba);
 
        if (rc == -EPERM) {
-               /* no privilage for reset, restore if needed */
-               if (before_fc_flag & FC_OFFLINE_MODE)
-                       goto out;
+               /* no privilage for reset */
+               lpfc_printf_log(phba, KERN_ERR, LOG_SLI,
+                               "3150 No privilage to perform the requested "
+                               "access: x%x\n", reg_val);
        } else if (rc == -EIO) {
                /* reset failed, there is nothing more we can do */
+               lpfc_printf_log(phba, KERN_ERR, LOG_SLI,
+                               "3153 Fail to perform the requested "
+                               "access: x%x\n", reg_val);
                return rc;
        }
 
index c04703a093bd856a700163e4b4974d2b6ffd59df..c7fa87bfb06a03b342a1e764af2d99f290371c65 100644 (file)
@@ -1465,8 +1465,12 @@ lpfc_handle_eratt_s4(struct lpfc_hba *phba)
                                phba->sli4_hba.u.if_type2.STATUSregaddr,
                                &portstat_reg.word0);
                /* consider PCI bus read error as pci_channel_offline */
-               if (pci_rd_rc1 == -EIO)
+               if (pci_rd_rc1 == -EIO) {
+                       lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
+                               "3151 PCI bus read access failure: x%x\n",
+                               readl(phba->sli4_hba.u.if_type2.STATUSregaddr));
                        return;
+               }
                reg_err1 = readl(phba->sli4_hba.u.if_type2.ERR1regaddr);
                reg_err2 = readl(phba->sli4_hba.u.if_type2.ERR2regaddr);
                if (bf_get(lpfc_sliport_status_oti, &portstat_reg)) {
@@ -1516,6 +1520,9 @@ lpfc_handle_eratt_s4(struct lpfc_hba *phba)
                        }
                        /* fall through for not able to recover */
                }
+               lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
+                               "3152 Unrecoverable error, bring the port "
+                               "offline\n");
                lpfc_sli4_offline_eratt(phba);
                break;
        case LPFC_SLI_INTF_IF_TYPE_1: