All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: "Martin K . Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org, Bart Van Assche <bvanassche@acm.org>,
	Benjamin Block <bblock@linux.ibm.com>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>
Subject: [PATCH v2 02/84] scsi: core: Rename scsi_mq_done() into scsi_done() and export it
Date: Wed, 29 Sep 2021 15:04:38 -0700	[thread overview]
Message-ID: <20210929220600.3509089-3-bvanassche@acm.org> (raw)
In-Reply-To: <20210929220600.3509089-1-bvanassche@acm.org>

Since the removal of the legacy block layer there is only one completion
function left in the SCSI core, namely scsi_mq_done(). Rename it into
scsi_done(). Export that function to allow SCSI LLDs to call it directly.

Reviewed-by: Benjamin Block <bblock@linux.ibm.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/scsi/scsi_lib.c  | 5 +++--
 include/scsi/scsi_cmnd.h | 2 ++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index c0c1f1ca0382..47bfd12abdda 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1575,7 +1575,7 @@ static blk_status_t scsi_prepare_cmd(struct request *req)
 	return scsi_cmd_to_driver(cmd)->init_command(cmd);
 }
 
-static void scsi_mq_done(struct scsi_cmnd *cmd)
+void scsi_done(struct scsi_cmnd *cmd)
 {
 	switch (cmd->submitter) {
 	case SUBMITTED_BY_BLOCK_LAYER:
@@ -1593,6 +1593,7 @@ static void scsi_mq_done(struct scsi_cmnd *cmd)
 	trace_scsi_dispatch_cmd_done(cmd);
 	blk_mq_complete_request(scsi_cmd_to_rq(cmd));
 }
+EXPORT_SYMBOL(scsi_done);
 
 static void scsi_mq_put_budget(struct request_queue *q, int budget_token)
 {
@@ -1693,7 +1694,7 @@ static blk_status_t scsi_queue_rq(struct blk_mq_hw_ctx *hctx,
 	scsi_set_resid(cmd, 0);
 	memset(cmd->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE);
 	cmd->submitter = SUBMITTED_BY_BLOCK_LAYER;
-	cmd->scsi_done = scsi_mq_done;
+	cmd->scsi_done = scsi_done;
 
 	blk_mq_start_request(req);
 	reason = scsi_dispatch_cmd(cmd);
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h
index 893c24aab8e4..4edaadc293a7 100644
--- a/include/scsi/scsi_cmnd.h
+++ b/include/scsi/scsi_cmnd.h
@@ -171,6 +171,8 @@ static inline struct scsi_driver *scsi_cmd_to_driver(struct scsi_cmnd *cmd)
 	return *(struct scsi_driver **)rq->rq_disk->private_data;
 }
 
+void scsi_done(struct scsi_cmnd *cmd);
+
 extern void scsi_finish_command(struct scsi_cmnd *cmd);
 
 extern void *scsi_kmap_atomic_sg(struct scatterlist *sg, int sg_count,

  parent reply	other threads:[~2021-09-29 22:06 UTC|newest]

Thread overview: 105+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-29 22:04 [PATCH v2 00/84] Call scsi_done() directly Bart Van Assche
2021-09-29 22:04 ` [PATCH v2 01/84] scsi: core: Use a member variable to track the SCSI command submitter Bart Van Assche
2021-10-01 15:57   ` Benjamin Block
2021-10-03 21:08   ` Bean Huo
2021-09-29 22:04 ` Bart Van Assche [this message]
2021-10-03 21:10   ` [PATCH v2 02/84] scsi: core: Rename scsi_mq_done() into scsi_done() and export it Bean Huo
2021-09-29 22:04 ` [PATCH v2 03/84] ata: Call scsi_done() directly Bart Van Assche
2021-09-29 22:04 ` [PATCH v2 04/84] firewire: sbp2: " Bart Van Assche
2021-09-29 22:04 ` [PATCH v2 05/84] ib_srp: " Bart Van Assche
2021-09-29 22:04 ` [PATCH v2 06/84] message: fusion: " Bart Van Assche
2021-09-29 22:04 ` [PATCH v2 07/84] zfcp_scsi: " Bart Van Assche
2021-09-29 22:04 ` [PATCH v2 08/84] 3w-9xxx: " Bart Van Assche
2021-09-29 22:04 ` [PATCH v2 09/84] 3w-sas: " Bart Van Assche
2021-09-29 22:04 ` [PATCH v2 10/84] 3w-xxxx: " Bart Van Assche
2021-09-29 22:04 ` [PATCH v2 11/84] 53c700: " Bart Van Assche
2021-09-29 22:04 ` [PATCH v2 12/84] BusLogic: " Bart Van Assche
2021-09-29 22:04 ` [PATCH v2 13/84] NCR5380: " Bart Van Assche
2021-09-29 22:04 ` [PATCH v2 14/84] a100u2w: " Bart Van Assche
2021-09-29 22:04 ` [PATCH v2 15/84] aacraid: Introduce aac_scsi_done() Bart Van Assche
2021-09-29 22:04 ` [PATCH v2 16/84] aacraid: Call scsi_done() directly Bart Van Assche
2021-09-29 22:04 ` [PATCH v2 17/84] acornscsi: " Bart Van Assche
2021-09-29 22:04 ` [PATCH v2 18/84] advansys: " Bart Van Assche
2021-09-29 22:04 ` [PATCH v2 19/84] aha152x: " Bart Van Assche
2021-09-29 22:04 ` [PATCH v2 20/84] aha1542: " Bart Van Assche
2021-09-29 22:04 ` [PATCH v2 21/84] aic7xxx: " Bart Van Assche
2021-09-29 22:04 ` [PATCH v2 22/84] arcmsr: " Bart Van Assche
2021-09-29 22:04 ` [PATCH v2 23/84] atp870u: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 24/84] bfa: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 25/84] bnx2fc: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 26/84] csiostor: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 27/84] cxlflash: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 28/84] dc395x: " Bart Van Assche
2021-09-30 10:26   ` Oliver Neukum
2021-09-30 16:04     ` Bart Van Assche
2021-10-04  9:44       ` Oliver Neukum
2021-10-04 16:23         ` Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 29/84] dpt_i2o: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 30/84] esas2r: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 31/84] esp_scsi: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 32/84] fas216: Introduce struct fas216_cmd_priv Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 33/84] fas216: Stop using scsi_cmnd.scsi_done Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 34/84] fdomain: Call scsi_done() directly Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 35/84] fnic: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 36/84] hpsa: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 37/84] hptiop: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 38/84] ibmvscsi: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 39/84] imm: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 40/84] initio: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 41/84] ipr: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 42/84] ips: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 43/84] libfc: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 44/84] libiscsi: " Bart Van Assche
2021-10-05 23:52   ` Lee Duncan
2021-09-29 22:05 ` [PATCH v2 45/84] libsas: " Bart Van Assche
2021-09-30 18:08   ` John Garry
2021-09-30 18:20     ` Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 46/84] lpfc: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 47/84] mac53c94: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 48/84] megaraid: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 49/84] " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 50/84] mesh: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 51/84] mpi3mr: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 52/84] mpt3sas: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 53/84] mvumi: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 54/84] myrb: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 55/84] myrs: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 56/84] ncr53c8xx: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 57/84] nsp32: " Bart Van Assche
2021-10-04  4:15   ` Masanori Goto
2021-10-04 16:28     ` Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 58/84] pcmcia: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 59/84] pmcraid: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 60/84] ppa: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 61/84] ps3rom: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 62/84] qedf: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 63/84] qla1280: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 64/84] qla2xxx: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 65/84] qla4xxx: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 66/84] qlogicfas408: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 67/84] qlogicpti: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 68/84] scsi_debug: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 69/84] smartpqi: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 70/84] snic: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 71/84] stex: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 72/84] storvsc_drv: " Bart Van Assche
2021-09-30 17:57   ` Haiyang Zhang
2021-10-06 12:00     ` Wei Liu
2021-10-06 22:11       ` Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 73/84] sym53c8xx_2: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 74/84] ufs: " Bart Van Assche
2021-10-03 21:10   ` Bean Huo
2021-09-29 22:05 ` [PATCH v2 75/84] virtio_scsi: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 76/84] vmw_pvscsi: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 77/84] wd33c93: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 78/84] wd719x: " Bart Van Assche
2021-09-29 22:05 ` [PATCH v2 79/84] xen-scsifront: " Bart Van Assche
2021-09-29 22:11 ` [PATCH v2 80/84] staging: rts5208: " Bart Van Assche
2021-09-29 22:11 ` [PATCH v2 81/84] staging: unisys: visorhba: " Bart Van Assche
2021-09-30  6:00   ` Greg Kroah-Hartman
2021-09-29 22:11 ` [PATCH v2 82/84] target/tcm_loop: " Bart Van Assche
2021-09-29 22:11 ` [PATCH v2 83/84] usb: " Bart Van Assche
2021-09-29 22:11 ` [PATCH v2 84/84] scsi: core: Call scsi_done directly Bart Van Assche
2021-10-03 21:14   ` Bean Huo
2021-09-30  7:25 ` [PATCH v2 00/84] Call scsi_done() directly Bean Huo
2021-09-30 16:07   ` Bart Van Assche

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=20210929220600.3509089-3-bvanassche@acm.org \
    --to=bvanassche@acm.org \
    --cc=bblock@linux.ibm.com \
    --cc=jejb@linux.ibm.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.