From: Vaios Papadimitriou Date: Tue, 8 May 2012 22:01:23 +0000 (-0500) Subject: Fix driver does not reset port when reset is needed during fw_dump (CR 125807) X-Git-Tag: v2.6.39-400.9.0~423^2~123^2~26 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=fa76206ede0e5a3830207f101ee9d7fea448a706;p=users%2Fjedix%2Flinux-maple.git Fix driver does not reset port when reset is needed during fw_dump (CR 125807) 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 --- diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 2e7c6f8bef912..5f41787b9c4f6 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -7210,19 +7210,17 @@ lpfc_pci_function_reset(struct lpfc_hba *phba) rc = -ENODEV; goto out; } - if (bf_get(lpfc_sliport_status_rdy, ®_data)) - break; - if (bf_get(lpfc_sliport_status_rn, ®_data)) { + if (bf_get(lpfc_sliport_status_rn, ®_data)) reset_again++; + if (bf_get(lpfc_sliport_status_rdy, ®_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;