All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Christie <michael.christie@oracle.com>
To: bostroesser@gmail.com, mst@redhat.com, stefanha@redhat.com,
	Chaitanya.Kulkarni@wdc.com, hch@lst.de, loberman@redhat.com,
	martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
	target-devel@vger.kernel.org
Cc: Mike Christie <michael.christie@oracle.com>,
	Michael Cyr <mikecyr@linux.ibm.com>
Subject: [PATCH 06/25] ibmvscsi_tgt: Convert to new submission API
Date: Sat, 27 Feb 2021 10:59:47 -0600	[thread overview]
Message-ID: <20210227170006.5077-7-michael.christie@oracle.com> (raw)
In-Reply-To: <20210227170006.5077-1-michael.christie@oracle.com>

target_submit_cmd is now only for simple drivers that do their
own sync during shutdown and do not use target_stop_session. It
will never return a failure, so we can remove that code from
the driver.

Cc: Michael Cyr <mikecyr@linux.ibm.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
---
 drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

diff --git a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
index cc3908c2d2f9..cfc54532402c 100644
--- a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
+++ b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
@@ -2670,7 +2670,6 @@ static void ibmvscsis_parse_cmd(struct scsi_info *vscsi,
 	u64 data_len = 0;
 	enum dma_data_direction dir;
 	int attr = 0;
-	int rc = 0;
 
 	nexus = vscsi->tport.ibmv_nexus;
 	/*
@@ -2725,17 +2724,9 @@ static void ibmvscsis_parse_cmd(struct scsi_info *vscsi,
 
 	srp->lun.scsi_lun[0] &= 0x3f;
 
-	rc = target_submit_cmd(&cmd->se_cmd, nexus->se_sess, srp->cdb,
-			       cmd->sense_buf, scsilun_to_int(&srp->lun),
-			       data_len, attr, dir, 0);
-	if (rc) {
-		dev_err(&vscsi->dev, "target_submit_cmd failed, rc %d\n", rc);
-		spin_lock_bh(&vscsi->intr_lock);
-		list_del(&cmd->list);
-		ibmvscsis_free_cmd_resources(vscsi, cmd);
-		spin_unlock_bh(&vscsi->intr_lock);
-		goto fail;
-	}
+	target_submit_cmd(&cmd->se_cmd, nexus->se_sess, srp->cdb,
+			  cmd->sense_buf, scsilun_to_int(&srp->lun),
+			  data_len, attr, dir, 0);
 	return;
 
 fail:
-- 
2.25.1


  parent reply	other threads:[~2021-02-27 17:13 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-27 16:59 [PATCH 00/25 V5] target: fix cmd plugging and submission Mike Christie
2021-02-27 16:59 ` [PATCH 01/25] target: move t_task_cdb initialization Mike Christie
2021-03-04  4:15   ` Martin K. Petersen
2021-02-27 16:59 ` [PATCH 02/25] target: drop kref_get_unless_zero in target_get_sess_cmd Mike Christie
2021-02-27 16:59 ` [PATCH 03/25] target: rename transport_init_se_cmd Mike Christie
2021-02-27 16:59 ` [PATCH 04/25] target: break up target_submit_cmd_map_sgls Mike Christie
2021-02-27 16:59 ` [PATCH 05/25] srpt: Convert to new submission API Mike Christie
2021-02-27 16:59 ` Mike Christie [this message]
2021-02-27 16:59 ` [PATCH 07/25] qla2xxx: " Mike Christie
2021-02-27 16:59 ` [PATCH 08/25] tcm_loop: " Mike Christie
2021-02-27 16:59 ` [PATCH 09/25] sbp_target: " Mike Christie
2021-02-27 16:59 ` [PATCH 10/25] usb gadget: " Mike Christie
2021-02-27 16:59 ` [PATCH 11/25] vhost-scsi: " Mike Christie
2021-02-27 16:59 ` [PATCH 12/25] xen-scsiback: " Mike Christie
2021-02-27 16:59 ` [PATCH 13/25] tcm_fc: " Mike Christie
2021-02-27 16:59 ` [PATCH 14/25] target: remove target_submit_cmd_map_sgls Mike Christie
2021-02-27 16:59 ` [PATCH 15/25] target: add gfp_t arg to target_cmd_init_cdb Mike Christie
2021-02-27 16:59 ` [PATCH 16/25] target: add workqueue based cmd submission Mike Christie
2021-02-27 16:59 ` [PATCH 17/25] vhost scsi: use lio wq cmd submission helper Mike Christie
2021-02-27 16:59 ` [PATCH 18/25] tcm loop: use blk cmd allocator for se_cmds Mike Christie
2021-02-27 17:00 ` [PATCH 19/25] tcm loop: use lio wq cmd submission helper Mike Christie
2021-02-27 17:00 ` [PATCH 20/25] target: cleanup cmd flag bits Mike Christie
2021-02-27 17:00 ` [PATCH 21/25] target: fix backend plugging Mike Christie
2021-02-27 17:00 ` [PATCH 22/25] target iblock: add backend plug/unplug callouts Mike Christie
2021-02-27 17:00 ` [PATCH 23/25] target_core_user: " Mike Christie
2021-02-27 17:00 ` [PATCH 24/25] target: flush submission work during TMR processing Mike Christie
2021-02-27 17:00 ` [PATCH 25/25] target: make completion affinity configurable Mike Christie
2021-03-01 10:01 ` [PATCH 00/25 V5] target: fix cmd plugging and submission Stefan Hajnoczi
  -- strict thread matches above, loose matches on Subject: below --
2021-02-17 20:27 Mike Christie
2021-02-17 20:27 ` [PATCH 06/25] ibmvscsi_tgt: Convert to new submission API Mike Christie
2021-02-12  7:26 PATCH 00/25 V4] target: fix cmd plugging and submission Mike Christie
2021-02-12  7:26 ` [PATCH 06/25] ibmvscsi_tgt: Convert to new submission API 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=20210227170006.5077-7-michael.christie@oracle.com \
    --to=michael.christie@oracle.com \
    --cc=Chaitanya.Kulkarni@wdc.com \
    --cc=bostroesser@gmail.com \
    --cc=hch@lst.de \
    --cc=linux-scsi@vger.kernel.org \
    --cc=loberman@redhat.com \
    --cc=martin.petersen@oracle.com \
    --cc=mikecyr@linux.ibm.com \
    --cc=mst@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=target-devel@vger.kernel.org \
    /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.