RE: [EXT] [PATCH 11/13] scsi: qedi: pass send_iscsi_tmf task to abort

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Mike Christie <michael.christie@xxxxxxxxxx>
> Sent: Sunday, April 11, 2021 12:10 AM
> To: lduncan@xxxxxxxx; martin.petersen@xxxxxxxxxx; Manish Rangankar
> <mrangankar@xxxxxxxxxxx>; Santosh Vernekar <svernekar@xxxxxxxxxxx>;
> linux-scsi@xxxxxxxxxxxxxxx; jejb@xxxxxxxxxxxxx
> Cc: Mike Christie <michael.christie@xxxxxxxxxx>
> 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@xxxxxxxxxx>
> ---
>  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@xxxxxxxxxxx>




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux