diff mbox series

[v2,11/12] qla2xxx: Do logout even if fabric scan retries got exhausted

Message ID 20210329085229.4367-12-njavali@marvell.com
State New
Headers show
Series qla2xxx driver bug fixes | expand

Commit Message

Nilesh Javali March 29, 2021, 8:52 a.m. UTC
From: Quinn Tran <qutran@marvell.com>

Perform logout of all remote ports so that all IOs with
driver are requeued with mid-layer for retry.

Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Quinn Tran <qutran@marvell.com>
---
 drivers/scsi/qla2xxx/qla_gs.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Himanshu Madhani March 29, 2021, 2:13 p.m. UTC | #1
> On Mar 29, 2021, at 3:52 AM, Nilesh Javali <njavali@marvell.com> wrote:
> 
> From: Quinn Tran <qutran@marvell.com>
> 
> Perform logout of all remote ports so that all IOs with
> driver are requeued with mid-layer for retry.
> 
> Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
> Signed-off-by: Nilesh Javali <njavali@marvell.com>
> Signed-off-by: Quinn Tran <qutran@marvell.com>
> ---
> drivers/scsi/qla2xxx/qla_gs.c | 4 ++++
> 1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c
> index 517d358b0031..2a93d9c3c024 100644
> --- a/drivers/scsi/qla2xxx/qla_gs.c
> +++ b/drivers/scsi/qla2xxx/qla_gs.c
> @@ -3443,6 +3443,10 @@ void qla24xx_async_gnnft_done(scsi_qla_host_t *vha, srb_t *sp)
> 			list_for_each_entry(fcport, &vha->vp_fcports, list) {
> 				if ((fcport->flags & FCF_FABRIC_DEVICE) != 0) {
> 					fcport->scan_state = QLA_FCPORT_SCAN;
> +					if (fcport->loop_id == FC_NO_LOOP_ID)
> +						fcport->logout_on_delete = 0;
> +					else
> +						fcport->logout_on_delete = 1;
> 				}
> 			}
> 			goto login_logout;
> -- 
> 2.19.0.rc0
> 

Looks Good. 

Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
--
Himanshu Madhani	 Oracle Linux Engineering
diff mbox series

Patch

diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c
index 517d358b0031..2a93d9c3c024 100644
--- a/drivers/scsi/qla2xxx/qla_gs.c
+++ b/drivers/scsi/qla2xxx/qla_gs.c
@@ -3443,6 +3443,10 @@  void qla24xx_async_gnnft_done(scsi_qla_host_t *vha, srb_t *sp)
 			list_for_each_entry(fcport, &vha->vp_fcports, list) {
 				if ((fcport->flags & FCF_FABRIC_DEVICE) != 0) {
 					fcport->scan_state = QLA_FCPORT_SCAN;
+					if (fcport->loop_id == FC_NO_LOOP_ID)
+						fcport->logout_on_delete = 0;
+					else
+						fcport->logout_on_delete = 1;
 				}
 			}
 			goto login_logout;