All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manish Rangankar <mrangankar@marvell.com>
To: Mike Christie <michael.christie@oracle.com>,
	"lduncan@suse.com" <lduncan@suse.com>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
	Santosh Vernekar <svernekar@marvell.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"jejb@linux.ibm.com" <jejb@linux.ibm.com>
Subject: RE: [EXT] [PATCH 11/13] scsi: qedi: pass send_iscsi_tmf task to abort
Date: Mon, 12 Apr 2021 10:34:39 +0000	[thread overview]
Message-ID: <BYAPR18MB2998C372567704451C3264E5D8709@BYAPR18MB2998.namprd18.prod.outlook.com> (raw)
In-Reply-To: <20210410184016.21603-12-michael.christie@oracle.com>

> -----Original Message-----
> From: Mike Christie <michael.christie@oracle.com>
> Sent: Sunday, April 11, 2021 12:10 AM
> To: lduncan@suse.com; martin.petersen@oracle.com; Manish Rangankar
> <mrangankar@marvell.com>; Santosh Vernekar <svernekar@marvell.com>;
> linux-scsi@vger.kernel.org; jejb@linux.ibm.com
> Cc: Mike Christie <michael.christie@oracle.com>
> Subject: [EXT] [PATCH 11/13] scsi: qedi: pass send_iscsi_tmf task to abort
> 
> External Email
> 
> ----------------------------------------------------------------------
> qedi_abort_work knows what task to abort so just pass it to send_iscsi_tmf.
> 
> Signed-off-by: Mike Christie <michael.christie@oracle.com>
> ---
>  drivers/scsi/qedi/qedi_fw.c | 17 +++++------------
>  1 file changed, 5 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/scsi/qedi/qedi_fw.c b/drivers/scsi/qedi/qedi_fw.c index
> f13f8af6d931..475cb7823cf1 100644
> --- a/drivers/scsi/qedi/qedi_fw.c
> +++ b/drivers/scsi/qedi/qedi_fw.c
> @@ -15,7 +15,7 @@
>  #include "qedi_fw_scsi.h"
> 
>  static int send_iscsi_tmf(struct qedi_conn *qedi_conn,
> -			  struct iscsi_task *mtask);
> +			  struct iscsi_task *mtask, struct iscsi_task *ctask);
> 
>  void qedi_iscsi_unmap_sg_list(struct qedi_cmd *cmd)  { @@ -1425,7 +1425,7
> @@ static void qedi_abort_work(struct work_struct *work)
>  		goto ldel_exit;
>  	}
> 
> -	send_iscsi_tmf(qedi_conn, qedi_cmd->task);
> +	send_iscsi_tmf(qedi_conn, qedi_cmd->task, ctask);
> 
>  put_task:
>  	iscsi_put_task(ctask);
> @@ -1455,14 +1455,13 @@ static void qedi_abort_work(struct work_struct
> *work)
>  	clear_bit(QEDI_CONN_FW_CLEANUP, &qedi_conn->flags);  }
> 
> -static int send_iscsi_tmf(struct qedi_conn *qedi_conn, struct iscsi_task *mtask)
> +static int send_iscsi_tmf(struct qedi_conn *qedi_conn, struct iscsi_task *mtask,
> +			  struct iscsi_task *ctask)
>  {
>  	struct iscsi_tmf_request_hdr tmf_pdu_header;
>  	struct iscsi_task_params task_params;
>  	struct qedi_ctx *qedi = qedi_conn->qedi;
>  	struct e4_iscsi_task_context *fw_task_ctx;
> -	struct iscsi_conn *conn = qedi_conn->cls_conn->dd_data;
> -	struct iscsi_task *ctask;
>  	struct iscsi_tm *tmf_hdr;
>  	struct qedi_cmd *qedi_cmd;
>  	struct qedi_cmd *cmd;
> @@ -1502,12 +1501,6 @@ static int send_iscsi_tmf(struct qedi_conn
> *qedi_conn, struct iscsi_task *mtask)
> 
>  	if ((tmf_hdr->flags & ISCSI_FLAG_TM_FUNC_MASK) ==
>  	     ISCSI_TM_FUNC_ABORT_TASK) {
> -		ctask = iscsi_itt_to_task(conn, tmf_hdr->rtt);
> -		if (!ctask || !ctask->sc) {
> -			QEDI_ERR(&qedi->dbg_ctx,
> -				 "Could not get reference task\n");
> -			return 0;
> -		}
>  		cmd = (struct qedi_cmd *)ctask->dd_data;
>  		tmf_pdu_header.rtt =
>  				qedi_set_itt(cmd->task_id,
> @@ -1560,7 +1553,7 @@ int qedi_send_iscsi_tmf(struct qedi_conn *qedi_conn,
> struct iscsi_task *mtask)
>  	case ISCSI_TM_FUNC_LOGICAL_UNIT_RESET:
>  	case ISCSI_TM_FUNC_TARGET_WARM_RESET:
>  	case ISCSI_TM_FUNC_TARGET_COLD_RESET:
> -		rc = send_iscsi_tmf(qedi_conn, mtask);
> +		rc = send_iscsi_tmf(qedi_conn, mtask, NULL);
>  		break;
>  	default:
>  		QEDI_ERR(&qedi->dbg_ctx, "Invalid tmf, cid=0x%x\n",
> --
> 2.25.1

Thanks,
Reviewed-by: Manish Rangankar <mrangankar@marvell.com>

  reply	other threads:[~2021-04-12 10:35 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-10 18:40 [RFC PATCH 0/13]: qedi tmf fixes Mike Christie
2021-04-10 18:40 ` [PATCH 01/13] scsi: iscsi: revert Perform connection failure entirely in kernel space Mike Christie
2021-04-10 18:40 ` [PATCH 02/13] scsi: qedi: fix null ref during abort handling Mike Christie
2021-04-12 10:25   ` [EXT] " Manish Rangankar
2021-04-10 18:40 ` [PATCH 03/13] scsi: iscsi: add task completion helper Mike Christie
2021-04-10 18:40 ` [PATCH 04/13] scsi: qedi: fix abort vs cmd re-use race Mike Christie
2021-04-12 10:24   ` [EXT] " Manish Rangankar
2021-04-10 18:40 ` [PATCH 05/13] scsi: qedi: fix use after free during abort cleanup Mike Christie
2021-04-12 10:26   ` [EXT] " Manish Rangankar
2021-04-10 18:40 ` [PATCH 06/13] scsi: qedi: fix tmf tid allocation Mike Christie
2021-04-12 10:27   ` [EXT] " Manish Rangankar
2021-04-10 18:40 ` [PATCH 07/13] scsi: qedi: use GFP_NOIO for tmf allocation Mike Christie
2021-04-12 10:28   ` [EXT] " Manish Rangankar
2021-04-10 18:40 ` [PATCH 08/13] scsi: iscsi: fix lun/target reset cmd cleanup handling Mike Christie
2021-04-10 18:40 ` [PATCH 09/13] scsi: qedi: fix session block/unblock abuse during tmf handling Mike Christie
2021-04-12 10:31   ` [EXT] " Manish Rangankar
2021-04-10 18:40 ` [PATCH 10/13] scsi: qedi: fix session block/unblock abuse during cleanup Mike Christie
2021-04-12 10:33   ` [EXT] " Manish Rangankar
2021-04-10 18:40 ` [PATCH 11/13] scsi: qedi: pass send_iscsi_tmf task to abort Mike Christie
2021-04-12 10:34   ` Manish Rangankar [this message]
2021-04-10 18:40 ` [PATCH 12/13] scsi: qedi: make sure tmf works are done before disconnect Mike Christie
2021-04-12 10:36   ` [EXT] " Manish Rangankar
2021-04-10 18:40 ` [PATCH 13/13] scsi: qedi: always wake up if cmd_cleanup_req is set Mike Christie
2021-04-12 10:35   ` [EXT] " Manish Rangankar
2021-04-12 10:22 ` [EXT] [RFC PATCH 0/13]: qedi tmf fixes Manish Rangankar

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=BYAPR18MB2998C372567704451C3264E5D8709@BYAPR18MB2998.namprd18.prod.outlook.com \
    --to=mrangankar@marvell.com \
    --cc=jejb@linux.ibm.com \
    --cc=lduncan@suse.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=michael.christie@oracle.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.