]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
Fixed SLI4 driver module load and unload test in a loop crashes the system (CR 126397)
authorVaios Papadimitriou <vaios.papadimitriou@emulex.com>
Tue, 8 May 2012 22:01:27 +0000 (17:01 -0500)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Wed, 9 May 2012 00:01:27 +0000 (17:01 -0700)
Loading/unloading the lpfc driver overnight when an LPe16000 sees multiple
targets can result in a kernel panic. This is because the board was not
correctly being reset, now correctly clear the Status register so the proper
reset is done.

commit id: 8fcb8acd6cb1529c596c274a6d375cbe9a134dcb

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

index aa79d00b4567d57cd4169322421edae626fb259d..602d3e610f7dca167edf2c318e47577f6f31514a 100644 (file)
@@ -5793,10 +5793,9 @@ lpfc_sli4_post_status_check(struct lpfc_hba *phba)
                                        readl(phba->sli4_hba.u.if_type2.
                                              ERR2regaddr);
                                lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
-                                       "2888 Port Error Detected "
-                                       "during POST: "
-                                       "port status reg 0x%x, "
-                                       "port_smphr reg 0x%x, "
+                                       "2888 Unrecoverable port error "
+                                       "following POST: port status reg "
+                                       "0x%x, port_smphr reg 0x%x, "
                                        "error 1=0x%x, error 2=0x%x\n",
                                        reg_data.word0,
                                        portsmphr_reg.word0,
@@ -7251,7 +7250,8 @@ lpfc_pci_function_reset(struct lpfc_hba *phba)
                               LPFC_SLIPORT_INIT_PORT);
                        writel(reg_data.word0, phba->sli4_hba.u.if_type2.
                               CTRLregaddr);
-
+                       /* flush */
+                       readl(phba->sli4_hba.u.if_type2.STATUSregaddr);
                        /*
                         * Poll the Port Status Register and wait for RDY for
                         * up to 10 seconds.  If the port doesn't respond, treat
@@ -7289,11 +7289,10 @@ lpfc_pci_function_reset(struct lpfc_hba *phba)
                                phba->work_status[1] = readl(
                                        phba->sli4_hba.u.if_type2.ERR2regaddr);
                                lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
-                                       "2890 Port Error Detected "
-                                       "during Port Reset: "
-                                       "port status reg 0x%x, "
+                                       "2890 Port error detected during port "
+                                       "reset(%d): port status reg 0x%x, "
                                        "error 1=0x%x, error 2=0x%x\n",
-                                       reg_data.word0,
+                                       num_resets, reg_data.word0,
                                        phba->work_status[0],
                                        phba->work_status[1]);
                                rc = -ENODEV;