All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nilesh Javali <njavali@marvell.com>
To: <martin.petersen@oracle.com>
Cc: <linux-scsi@vger.kernel.org>, <GR-QLogic-Storage-Upstream@marvell.com>
Subject: [PATCH 04/14] qla2xxx: Changes to support FCP2 Target
Date: Thu, 5 Aug 2021 03:19:55 -0700	[thread overview]
Message-ID: <20210805102005.20183-5-njavali@marvell.com> (raw)
In-Reply-To: <20210805102005.20183-1-njavali@marvell.com>

From: Saurav Kashyap <skashyap@marvell.com>

Add changes to support FCP2 Target.

Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
---
 drivers/scsi/qla2xxx/qla_dbg.c  |  3 +--
 drivers/scsi/qla2xxx/qla_init.c |  6 ++++++
 drivers/scsi/qla2xxx/qla_os.c   | 11 +++++++++++
 3 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c
index f2d05592c1e2..25549a8a2d72 100644
--- a/drivers/scsi/qla2xxx/qla_dbg.c
+++ b/drivers/scsi/qla2xxx/qla_dbg.c
@@ -12,8 +12,7 @@
  * ----------------------------------------------------------------------
  * | Module Init and Probe        |       0x0199       |                |
  * | Mailbox commands             |       0x1206       | 0x11a5-0x11ff	|
- * | Device Discovery             |       0x2134       | 0x210e-0x2116  |
- * |				  | 		       | 0x211a         |
+ * | Device Discovery             |       0x2134       | 0x210e-0x2115  |
  * |                              |                    | 0x211c-0x2128  |
  * |                              |                    | 0x212c-0x2134  |
  * | Queue Command and IO tracing |       0x3074       | 0x300b         |
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 24683ac1a620..be09dc4b3bf2 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -1787,6 +1787,12 @@ void qla2x00_handle_rscn(scsi_qla_host_t *vha, struct event_arg *ea)
 
 	fcport = qla2x00_find_fcport_by_nportid(vha, &ea->id, 1);
 	if (fcport) {
+		if (fcport->flags & FCF_FCP2_DEVICE) {
+			ql_dbg(ql_dbg_disc, vha, 0x2115,
+			       "Delaying session delete for FCP2 portid=%06x "
+			       "%8phC ", fcport->d_id.b24, fcport->port_name);
+			return;
+		}
 		fcport->scan_needed = 1;
 		fcport->rscn_gen++;
 	}
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 921bd4d127f4..61ae8cbba670 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -3981,6 +3981,17 @@ qla2x00_mark_all_devices_lost(scsi_qla_host_t *vha)
 	    "Mark all dev lost\n");
 
 	list_for_each_entry(fcport, &vha->vp_fcports, list) {
+		if (fcport->loop_id != FC_NO_LOOP_ID &&
+		    (fcport->flags & FCF_FCP2_DEVICE) &&
+		    fcport->port_type == FCT_TARGET &&
+		    !qla2x00_reset_active(vha)) {
+			ql_dbg(ql_dbg_disc, vha, 0x211a,
+			       "Delaying session delete for FCP2 flags 0x%x "
+			       "port_type = 0x%x port_id=%06x %phC", fcport->flags,
+			       fcport->port_type, fcport->d_id.b24,
+			       fcport->port_name);
+			continue;
+		}
 		fcport->scan_state = 0;
 		qlt_schedule_sess_for_deletion(fcport);
 	}
-- 
2.19.0.rc0


  parent reply	other threads:[~2021-08-05 10:22 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-05 10:19 [PATCH 00/14] qla2xxx driver bug fixes Nilesh Javali
2021-08-05 10:19 ` [PATCH 01/14] qla2xxx: Add host attribute to trigger MPI hang Nilesh Javali
2021-08-05 15:21   ` Himanshu Madhani
2021-08-05 10:19 ` [PATCH 02/14] qla2xxx: Change %p to %px in the log messages Nilesh Javali
2021-08-05 15:21   ` Himanshu Madhani
2021-08-05 10:19 ` [PATCH 03/14] qla2xxx: adjust request/response queue size for 28xx Nilesh Javali
2021-08-05 15:21   ` Himanshu Madhani
2021-08-05 10:19 ` Nilesh Javali [this message]
2021-08-05 15:24   ` [PATCH 04/14] qla2xxx: Changes to support FCP2 Target Himanshu Madhani
2021-08-05 10:19 ` [PATCH 05/14] qla2xxx: Show OS name and version in FDMI-1 Nilesh Javali
2021-08-05 15:25   ` Himanshu Madhani
2021-08-05 10:19 ` [PATCH 06/14] qla2xxx: fix debug print of 64G link speed Nilesh Javali
2021-08-05 15:28   ` Himanshu Madhani
2021-08-05 10:19 ` [PATCH 07/14] qla2xxx: fix port type info Nilesh Javali
2021-08-05 15:34   ` Himanshu Madhani
2021-08-05 10:19 ` [PATCH 08/14] qla2xxx: fix unsafe removal from link list Nilesh Javali
2021-08-05 15:38   ` Himanshu Madhani
2021-08-05 10:20 ` [PATCH 09/14] qla2xxx: fix npiv create erroneous error Nilesh Javali
2021-08-05 15:42   ` Himanshu Madhani
2021-08-05 10:20 ` [PATCH 10/14] qla2xxx: suppress unnecessary log messages during login Nilesh Javali
2021-08-05 15:43   ` Himanshu Madhani
2021-08-05 10:20 ` [PATCH 11/14] qla2xxx: Changes to support kdump kernel Nilesh Javali
2021-08-05 15:52   ` Himanshu Madhani
2021-08-05 10:20 ` [PATCH 12/14] qla2xxx: Changes to support kdump kernel for NVMe BFS Nilesh Javali
2021-08-05 15:52   ` Himanshu Madhani
2021-08-05 10:20 ` [PATCH 13/14] qla2xxx: Sync queue idx with queue_pair_map idx Nilesh Javali
2021-08-05 15:56   ` Himanshu Madhani
2021-08-05 10:20 ` [PATCH 14/14] qla2xxx: Update version to 10.02.06.100-k Nilesh Javali
2021-08-05 15:58   ` Himanshu Madhani
2021-08-05 16:22     ` Nilesh Javali

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=20210805102005.20183-5-njavali@marvell.com \
    --to=njavali@marvell.com \
    --cc=GR-QLogic-Storage-Upstream@marvell.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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.