Message ID | 20211224070712.17905-8-njavali@marvell.com |
---|---|
State | Superseded |
Headers | show |
Series | qla2xxx misc bug fixes and features | expand |
> On Dec 23, 2021, at 11:07 PM, Nilesh Javali <njavali@marvell.com> wrote: > > From: Quinn Tran <qutran@marvell.com> > > Per FW request, Exec FW can fail due to temp error resulting in driver not > attaching to the adapter. Add retry of this command up to 4 retries. > > Signed-off-by: Quinn Tran <qutran@marvell.com> > Signed-off-by: Nilesh Javali <njavali@marvell.com> > --- > drivers/scsi/qla2xxx/qla_mbx.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c > index 38e0f02c75e1..c4bd8a16d78c 100644 > --- a/drivers/scsi/qla2xxx/qla_mbx.c > +++ b/drivers/scsi/qla2xxx/qla_mbx.c > @@ -689,7 +689,7 @@ qla2x00_execute_fw(scsi_qla_host_t *vha, uint32_t risc_addr) > mbx_cmd_t *mcp = &mc; > u8 semaphore = 0; > #define EXE_FW_FORCE_SEMAPHORE BIT_7 > - u8 retry = 3; > + u8 retry = 5; > > ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x1025, > "Entered %s.\n", __func__); > @@ -764,6 +764,12 @@ qla2x00_execute_fw(scsi_qla_host_t *vha, uint32_t risc_addr) > goto again; > } > > + if (retry) { > + retry--; > + ql_dbg(ql_dbg_async, vha, 0x509d, > + "Exe FW retry: mb[0]=%x retry[%d]\n", mcp->mb[0], retry); > + goto again; > + } > ql_dbg(ql_dbg_mbx, vha, 0x1026, > "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); > vha->hw_err_cnt++; > -- > 2.23.1 > Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> -- Himanshu Madhani Oracle Linux Engineering
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index 38e0f02c75e1..c4bd8a16d78c 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c @@ -689,7 +689,7 @@ qla2x00_execute_fw(scsi_qla_host_t *vha, uint32_t risc_addr) mbx_cmd_t *mcp = &mc; u8 semaphore = 0; #define EXE_FW_FORCE_SEMAPHORE BIT_7 - u8 retry = 3; + u8 retry = 5; ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x1025, "Entered %s.\n", __func__); @@ -764,6 +764,12 @@ qla2x00_execute_fw(scsi_qla_host_t *vha, uint32_t risc_addr) goto again; } + if (retry) { + retry--; + ql_dbg(ql_dbg_async, vha, 0x509d, + "Exe FW retry: mb[0]=%x retry[%d]\n", mcp->mb[0], retry); + goto again; + } ql_dbg(ql_dbg_mbx, vha, 0x1026, "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); vha->hw_err_cnt++;