All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Christie <michael.christie@oracle.com>
To: lduncan@suse.com, martin.petersen@oracle.com,
	mrangankar@marvell.com, svernekar@marvell.com,
	linux-scsi@vger.kernel.org, jejb@linux.ibm.com
Cc: Mike Christie <michael.christie@oracle.com>
Subject: [PATCH v3 04/17] scsi: iscsi: drop suspend calls from ep_disconnect
Date: Thu, 15 Apr 2021 21:04:27 -0500	[thread overview]
Message-ID: <20210416020440.259271-5-michael.christie@oracle.com> (raw)
In-Reply-To: <20210416020440.259271-1-michael.christie@oracle.com>

libiscsi will now suspend the send/tx queue for the drivers so we can drop
it from the drivers ep_disconnect.

Signed-off-by: Mike Christie <michael.christie@oracle.com>
---
 drivers/scsi/be2iscsi/be_iscsi.c | 6 ------
 drivers/scsi/bnx2i/bnx2i_iscsi.c | 6 +-----
 drivers/scsi/cxgbi/libcxgbi.c    | 1 -
 drivers/scsi/qedi/qedi_iscsi.c   | 8 ++++----
 4 files changed, 5 insertions(+), 16 deletions(-)

diff --git a/drivers/scsi/be2iscsi/be_iscsi.c b/drivers/scsi/be2iscsi/be_iscsi.c
index a13c203ef7a9..a03d0ebc2312 100644
--- a/drivers/scsi/be2iscsi/be_iscsi.c
+++ b/drivers/scsi/be2iscsi/be_iscsi.c
@@ -1293,7 +1293,6 @@ static int beiscsi_conn_close(struct beiscsi_endpoint *beiscsi_ep)
 void beiscsi_ep_disconnect(struct iscsi_endpoint *ep)
 {
 	struct beiscsi_endpoint *beiscsi_ep;
-	struct beiscsi_conn *beiscsi_conn;
 	struct beiscsi_hba *phba;
 	uint16_t cri_index;
 
@@ -1312,11 +1311,6 @@ void beiscsi_ep_disconnect(struct iscsi_endpoint *ep)
 		return;
 	}
 
-	if (beiscsi_ep->conn) {
-		beiscsi_conn = beiscsi_ep->conn;
-		iscsi_suspend_queue(beiscsi_conn->conn);
-	}
-
 	if (!beiscsi_hba_is_online(phba)) {
 		beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG,
 			    "BS_%d : HBA in error 0x%lx\n", phba->state);
diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c b/drivers/scsi/bnx2i/bnx2i_iscsi.c
index b6c1da46d582..9a4f4776a78a 100644
--- a/drivers/scsi/bnx2i/bnx2i_iscsi.c
+++ b/drivers/scsi/bnx2i/bnx2i_iscsi.c
@@ -2113,7 +2113,6 @@ static void bnx2i_ep_disconnect(struct iscsi_endpoint *ep)
 {
 	struct bnx2i_endpoint *bnx2i_ep;
 	struct bnx2i_conn *bnx2i_conn = NULL;
-	struct iscsi_conn *conn = NULL;
 	struct bnx2i_hba *hba;
 
 	bnx2i_ep = ep->dd_data;
@@ -2126,11 +2125,8 @@ static void bnx2i_ep_disconnect(struct iscsi_endpoint *ep)
 		!time_after(jiffies, bnx2i_ep->timestamp + (12 * HZ)))
 		msleep(250);
 
-	if (bnx2i_ep->conn) {
+	if (bnx2i_ep->conn)
 		bnx2i_conn = bnx2i_ep->conn;
-		conn = bnx2i_conn->cls_conn->dd_data;
-		iscsi_suspend_queue(conn);
-	}
 	hba = bnx2i_ep->hba;
 
 	mutex_lock(&hba->net_dev_lock);
diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c
index f078b3c4e083..215dd0eb3f48 100644
--- a/drivers/scsi/cxgbi/libcxgbi.c
+++ b/drivers/scsi/cxgbi/libcxgbi.c
@@ -2968,7 +2968,6 @@ void cxgbi_ep_disconnect(struct iscsi_endpoint *ep)
 		ep, cep, cconn, csk, csk->state, csk->flags);
 
 	if (cconn && cconn->iconn) {
-		iscsi_suspend_tx(cconn->iconn);
 		write_lock_bh(&csk->callback_lock);
 		cep->csk->user_data = NULL;
 		cconn->cep = NULL;
diff --git a/drivers/scsi/qedi/qedi_iscsi.c b/drivers/scsi/qedi/qedi_iscsi.c
index ef16537c523c..30dc345b011c 100644
--- a/drivers/scsi/qedi/qedi_iscsi.c
+++ b/drivers/scsi/qedi/qedi_iscsi.c
@@ -988,7 +988,6 @@ static void qedi_ep_disconnect(struct iscsi_endpoint *ep)
 {
 	struct qedi_endpoint *qedi_ep;
 	struct qedi_conn *qedi_conn = NULL;
-	struct iscsi_conn *conn = NULL;
 	struct qedi_ctx *qedi;
 	int ret = 0;
 	int wait_delay;
@@ -1007,8 +1006,6 @@ static void qedi_ep_disconnect(struct iscsi_endpoint *ep)
 
 	if (qedi_ep->conn) {
 		qedi_conn = qedi_ep->conn;
-		conn = qedi_conn->cls_conn->dd_data;
-		iscsi_suspend_queue(conn);
 		abrt_conn = qedi_conn->abrt_conn;
 
 		while (count--)	{
@@ -1621,8 +1618,11 @@ void qedi_clear_session_ctx(struct iscsi_cls_session *cls_sess)
 	struct iscsi_conn *conn = session->leadconn;
 	struct qedi_conn *qedi_conn = conn->dd_data;
 
-	if (iscsi_is_session_online(cls_sess))
+	if (iscsi_is_session_online(cls_sess)) {
+		if (conn)
+			iscsi_suspend_queue(conn);
 		qedi_ep_disconnect(qedi_conn->iscsi_ep);
+	}
 
 	qedi_conn_destroy(qedi_conn->cls_conn);
 
-- 
2.25.1


  parent reply	other threads:[~2021-04-16  2:05 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-16  2:04 [PATCH v3 00/17] libicsi and qedi TMF fixes Mike Christie
2021-04-16  2:04 ` [PATCH v3 01/17] scsi: iscsi: add task completion helper Mike Christie
2021-04-16 21:56   ` Lee Duncan
2021-04-16  2:04 ` [PATCH v3 02/17] scsi: iscsi: sync libiscsi and driver reset cleanup Mike Christie
2021-04-17 17:22   ` Lee Duncan
2021-04-17 17:26     ` Mike Christie
2021-04-16  2:04 ` [PATCH v3 03/17] scsi: iscsi: stop queueing during ep_disconnect Mike Christie
2021-04-20 14:28   ` Lee Duncan
2021-04-16  2:04 ` Mike Christie [this message]
2021-04-20 14:29   ` [PATCH v3 04/17] scsi: iscsi: drop suspend calls from ep_disconnect Lee Duncan
2021-04-16  2:04 ` [PATCH v3 05/17] scsi: iscsi: wait on cmds before freeing conn Mike Christie
2021-04-22 15:02   ` Lee Duncan
2021-04-22 20:09     ` Mike Christie
2021-04-16  2:04 ` [PATCH v3 06/17] scsi: iscsi: fix use conn use after free Mike Christie
2021-04-24 21:11   ` Lee Duncan
2021-04-16  2:04 ` [PATCH v3 07/17] scsi: iscsi: move pool freeing Mike Christie
2021-04-24 21:12   ` Lee Duncan
2021-04-16  2:04 ` [PATCH v3 08/17] scsi: qedi: fix null ref during abort handling Mike Christie
2021-04-16  2:04 ` [PATCH v3 09/17] scsi: qedi: fix race during abort timeouts Mike Christie
2021-04-16 11:39   ` kernel test robot
2021-04-16 11:39     ` kernel test robot
2021-04-16 15:23     ` michael.christie
2021-04-16 15:23       ` michael.christie
2021-04-16  2:04 ` [PATCH v3 10/17] scsi: qedi: fix use after free during abort cleanup Mike Christie
2021-04-16  2:04 ` [PATCH v3 11/17] scsi: qedi: fix TMF tid allocation Mike Christie
2021-04-16  2:04 ` [PATCH v3 12/17] scsi: qedi: use GFP_NOIO for tmf allocation Mike Christie
2021-04-16  2:04 ` [PATCH v3 13/17] scsi: qedi: fix TMF session block/unblock use Mike Christie
2021-04-16  2:04 ` [PATCH v3 14/17] scsi: qedi: fix cleanup " Mike Christie
2021-04-16  2:04 ` [PATCH v3 15/17] scsi: qedi: pass send_iscsi_tmf task to abort Mike Christie
2021-04-16  2:04 ` [PATCH v3 16/17] scsi: qedi: complete TMF works before disconnect Mike Christie
2021-04-16  2:04 ` [PATCH v3 17/17] scsi: qedi: always wake up if cmd_cleanup_req is set Mike Christie

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=20210416020440.259271-5-michael.christie@oracle.com \
    --to=michael.christie@oracle.com \
    --cc=jejb@linux.ibm.com \
    --cc=lduncan@suse.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=mrangankar@marvell.com \
    --cc=svernekar@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.