diff mbox series

[1/2] scsi: qla2xxx: fix rports not being mark as lost in sync fabric scan

Message ID 20191122221912.20100-2-martin.wilck@suse.com (mailing list archive)
State Mainlined
Commit d341e9a8f2cffe4000c610225c629f62c7489c74
Headers show
Series scsi: qla2xxx: Fix rport removal after unzoning | expand

Commit Message

Martin Wilck Nov. 22, 2019, 10:19 p.m. UTC
From: Martin Wilck <mwilck@suse.com>

In qla2x00_find_all_fabric_devs(), fcport->flags & FCF_LOGIN_NEEDED
is a necessary condition for logging into new rports, but not for
dropping lost ones.

Fixes: 726b85487067 ("qla2xxx: Add framework for async fabric discovery")
Tested-by: David Bond <dbond@suse.com>
Signed-off-by: Martin Wilck <mwilck@suse.com>
---
 drivers/scsi/qla2xxx/qla_init.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 1dbee88..6c28f38 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -5898,8 +5898,7 @@  qla2x00_find_all_fabric_devs(scsi_qla_host_t *vha)
 		if (test_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags))
 			break;
 
-		if ((fcport->flags & FCF_FABRIC_DEVICE) == 0 ||
-		    (fcport->flags & FCF_LOGIN_NEEDED) == 0)
+		if ((fcport->flags & FCF_FABRIC_DEVICE) == 0)
 			continue;
 
 		if (fcport->scan_state == QLA_FCPORT_SCAN) {
@@ -5922,7 +5921,8 @@  qla2x00_find_all_fabric_devs(scsi_qla_host_t *vha)
 			}
 		}
 
-		if (fcport->scan_state == QLA_FCPORT_FOUND)
+		if (fcport->scan_state == QLA_FCPORT_FOUND &&
+		    (fcport->flags & FCF_LOGIN_NEEDED) != 0)
 			qla24xx_fcport_handle_login(vha, fcport);
 	}
 	return (rval);