All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Wilck <Martin.Wilck@suse.com>
To: "Martin K. Petersen" <martin.petersen@oracle.com>,
	Himanshu Madhani <hmadhani@marvell.com>,
	Quinn Tran <qutran@marvell.com>
Cc: Bart Van Assche <Bart.VanAssche@sandisk.com>,
	James Bottomley <jejb@linux.vnet.ibm.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	Martin Wilck <Martin.Wilck@suse.com>,
	"Hannes Reinecke" <hare@suse.de>, David Bond <DBond@suse.com>
Subject: [PATCH 1/2] scsi: qla2xxx: fix rports not being mark as lost in sync fabric scan
Date: Fri, 22 Nov 2019 22:19:22 +0000	[thread overview]
Message-ID: <20191122221912.20100-2-martin.wilck@suse.com> (raw)
In-Reply-To: <20191122221912.20100-1-martin.wilck@suse.com>

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 --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);
-- 
2.24.0


  reply	other threads:[~2019-11-22 22:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-22 22:19 [PATCH 0/2] scsi: qla2xxx: Fix rport removal after unzoning Martin Wilck
2019-11-22 22:19 ` Martin Wilck [this message]
2019-11-22 22:19 ` [PATCH 2/2] scsi: qla2xxx: unregister ports after GPN_FT failure Martin Wilck
2019-11-27  2:34 ` [PATCH 0/2] scsi: qla2xxx: Fix rport removal after unzoning Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191122221912.20100-2-martin.wilck@suse.com \
    --to=martin.wilck@suse.com \
    --cc=Bart.VanAssche@sandisk.com \
    --cc=DBond@suse.com \
    --cc=hare@suse.de \
    --cc=hmadhani@marvell.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=qutran@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.