]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
Fix driver does not reset port when reset is needed during fw_dump (CR 125807)
authorVaios Papadimitriou <vaios.papadimitriou@emulex.com>
Tue, 8 May 2012 22:01:23 +0000 (17:01 -0500)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Wed, 9 May 2012 00:01:24 +0000 (17:01 -0700)
A port error was detacted during rest, this is because the driver was not
looking for a RN flag in the status reg. Now only fail the reset if ERR bit is
set and the reset needed flag is not.

commit id: 6b5151fd7baec6812fece993ddd7a2cf9fd0125f

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

index 2e7c6f8bef912424439acfbc224b19faf15fcaa1..5f41787b9c4f6ea1ba436d716bc99f82d40c75e5 100644 (file)
@@ -7210,19 +7210,17 @@ lpfc_pci_function_reset(struct lpfc_hba *phba)
                                        rc = -ENODEV;
                                        goto out;
                                }
-                               if (bf_get(lpfc_sliport_status_rdy, &reg_data))
-                                       break;
-                               if (bf_get(lpfc_sliport_status_rn, &reg_data)) {
+                               if (bf_get(lpfc_sliport_status_rn, &reg_data))
                                        reset_again++;
+                               if (bf_get(lpfc_sliport_status_rdy, &reg_data))
                                        break;
-                               }
                        }
 
                        /*
                         * If the port responds to the init request with
                         * reset needed, delay for a bit and restart the loop.
                         */
-                       if (reset_again) {
+                       if (reset_again && (rdy_chk < 1000)) {
                                msleep(10);
                                reset_again = 0;
                                continue;