* [PATCH] scsi: core: Fix scsi_done() documentation
@ 2026-09-25 18:08 Bart Van Assche
2026-09-28 6:25 ` Damien Le Moal
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Bart Van Assche @ 2026-09-25 18:08 UTC (permalink / raw)
To: Martin K . Petersen
Cc: linux-scsi, Bart Van Assche, John Garry, Hannes Reinecke,
Damien Le Moal, Jonathan Corbet
Commit 11b68e36b167 ("scsi: core: Call scsi_done directly") changed
scsi_done from a function pointer member into a regular function.
Replace all references to the scsi_done function pointer member
with references to the scsi_done() function.
Cc: John Garry <john.garry@linux.dev>
Cc: Hannes Reinecke <hare@kernel.org>
Cc: Damien Le Moal <dlemoal@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
Documentation/scsi/scsi_mid_low_api.rst | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/Documentation/scsi/scsi_mid_low_api.rst b/Documentation/scsi/scsi_mid_low_api.rst
index 5489e9d07ab7..84cf61b2d6ae 100644
--- a/Documentation/scsi/scsi_mid_low_api.rst
+++ b/Documentation/scsi/scsi_mid_low_api.rst
@@ -865,7 +865,7 @@ Details::
*
* Other types of errors that are detected immediately may be
* flagged by setting scp->result to an appropriate value,
- * invoking the scp->scsi_done callback, and then returning 0
+ * invoking the scsi_done() function, and then returning 0
* from this function. If the command is not performed
* immediately (and the LLD is starting (or will start) the given
* command) then this function should place 0 in scp->result and
@@ -873,11 +873,11 @@ Details::
*
* Command ownership. If the driver returns zero, it owns the
* command and must take responsibility for ensuring the
- * scp->scsi_done callback is executed. Note: the driver may
- * call scp->scsi_done before returning zero, but after it has
- * called scp->scsi_done, it may not return any value other than
+ * scsi_done() function is called. Note: the driver may
+ * call scsi_done() before returning zero, but after it has
+ * called scsi_done(), it may not return any value other than
* zero. If the driver makes a non-zero return, it must not
- * execute the command's scsi_done callback at any time.
+ * call scsi_done(scp) at any time.
*
* Locks: up to and including 2.6.36, struct Scsi_Host::host_lock
* held on entry (with "irqsave") and is expected to be
@@ -887,16 +887,16 @@ Details::
* Calling context: in interrupt (soft irq) or process context
*
* Notes: This function should be relatively fast. Normally it
- * will not wait for IO to complete. Hence the scp->scsi_done
- * callback is invoked (often directly from an interrupt service
+ * will not wait for IO to complete. Hence the scsi_done()
+ * function is invoked (often directly from an interrupt service
* routine) some time after this function has returned. In some
* cases (e.g. pseudo adapter drivers that manufacture the
- * response to a SCSI INQUIRY) the scp->scsi_done callback may be
- * invoked before this function returns. If the scp->scsi_done
- * callback is not invoked within a certain period the SCSI mid
+ * response to a SCSI INQUIRY) the scsi_done() function may be
+ * invoked before this function returns. If the scsi_done()
+ * function is not invoked within a certain period the SCSI mid
* level will commence error processing. If a status of CHECK
- * CONDITION is placed in "result" when the scp->scsi_done
- * callback is invoked, then the LLD driver should perform
+ * CONDITION is placed in "result" when the scsi_done()
+ * function is invoked, then the LLD driver should perform
* autosense and fill in the struct scsi_cmnd::sense_buffer
* array. The scsi_cmnd::sense_buffer array is zeroed prior to
* the mid level queuing a command to an LLD.
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] scsi: core: Fix scsi_done() documentation
2026-09-25 18:08 [PATCH] scsi: core: Fix scsi_done() documentation Bart Van Assche
@ 2026-09-28 6:25 ` Damien Le Moal
2026-09-28 7:33 ` John Garry
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Damien Le Moal @ 2026-09-28 6:25 UTC (permalink / raw)
To: Bart Van Assche, Martin K . Petersen
Cc: linux-scsi, John Garry, Hannes Reinecke, Jonathan Corbet
On 2026/09/25 20:08, Bart Van Assche wrote:
> Commit 11b68e36b167 ("scsi: core: Call scsi_done directly") changed
> scsi_done from a function pointer member into a regular function.
>
> Replace all references to the scsi_done function pointer member
> with references to the scsi_done() function.
>
> Cc: John Garry <john.garry@linux.dev>
> Cc: Hannes Reinecke <hare@kernel.org>
> Cc: Damien Le Moal <dlemoal@kernel.org>
> Cc: Jonathan Corbet <corbet@lwn.net>
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
--
Damien Le Moal
Western Digital Research
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] scsi: core: Fix scsi_done() documentation
2026-09-25 18:08 [PATCH] scsi: core: Fix scsi_done() documentation Bart Van Assche
2026-09-28 6:25 ` Damien Le Moal
@ 2026-09-28 7:33 ` John Garry
2026-10-02 8:47 ` Hannes Reinecke
2026-10-03 13:48 ` Martin K. Petersen (Oracle)
3 siblings, 0 replies; 5+ messages in thread
From: John Garry @ 2026-09-28 7:33 UTC (permalink / raw)
To: Bart Van Assche, Martin K . Petersen
Cc: linux-scsi, Hannes Reinecke, Damien Le Moal, Jonathan Corbet
On 9/25/26 19:08, Bart Van Assche wrote:
> Commit 11b68e36b167 ("scsi: core: Call scsi_done directly") changed
> scsi_done from a function pointer member into a regular function.
>
> Replace all references to the scsi_done function pointer member
> with references to the scsi_done() function.
>
> Cc: John Garry<john.garry@linux.dev>
> Cc: Hannes Reinecke<hare@kernel.org>
> Cc: Damien Le Moal<dlemoal@kernel.org>
> Cc: Jonathan Corbet<corbet@lwn.net>
> Signed-off-by: Bart Van Assche<bvanassche@acm.org>
Looks ok. I guess that there is other misinformation in this doc, but I
didn't check.
Reviewed-by: John Garry <john.garry@linux.dev>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] scsi: core: Fix scsi_done() documentation
2026-09-25 18:08 [PATCH] scsi: core: Fix scsi_done() documentation Bart Van Assche
2026-09-28 6:25 ` Damien Le Moal
2026-09-28 7:33 ` John Garry
@ 2026-10-02 8:47 ` Hannes Reinecke
2026-10-03 13:48 ` Martin K. Petersen (Oracle)
3 siblings, 0 replies; 5+ messages in thread
From: Hannes Reinecke @ 2026-10-02 8:47 UTC (permalink / raw)
To: Bart Van Assche, Martin K . Petersen
Cc: linux-scsi, John Garry, Hannes Reinecke, Damien Le Moal,
Jonathan Corbet
On 9/25/26 8:08 PM, Bart Van Assche wrote:
> Commit 11b68e36b167 ("scsi: core: Call scsi_done directly") changed
> scsi_done from a function pointer member into a regular function.
>
> Replace all references to the scsi_done function pointer member
> with references to the scsi_done() function.
>
> Cc: John Garry <john.garry@linux.dev>
> Cc: Hannes Reinecke <hare@kernel.org>
> Cc: Damien Le Moal <dlemoal@kernel.org>
> Cc: Jonathan Corbet <corbet@lwn.net>
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> ---
> Documentation/scsi/scsi_mid_low_api.rst | 24 ++++++++++++------------
> 1 file changed, 12 insertions(+), 12 deletions(-)
>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] scsi: core: Fix scsi_done() documentation
2026-09-25 18:08 [PATCH] scsi: core: Fix scsi_done() documentation Bart Van Assche
` (2 preceding siblings ...)
2026-10-02 8:47 ` Hannes Reinecke
@ 2026-10-03 13:48 ` Martin K. Petersen (Oracle)
3 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen (Oracle) @ 2026-10-03 13:48 UTC (permalink / raw)
To: Bart Van Assche
Cc: Martin K . Petersen, linux-scsi, John Garry, Hannes Reinecke,
Damien Le Moal, Jonathan Corbet
Bart,
> Commit 11b68e36b167 ("scsi: core: Call scsi_done directly") changed
> scsi_done from a function pointer member into a regular function.
Applied to 7.4/scsi-staging, thanks!
--
Martin K. Petersen
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-10-03 13:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-25 18:08 [PATCH] scsi: core: Fix scsi_done() documentation Bart Van Assche
2026-09-28 6:25 ` Damien Le Moal
2026-09-28 7:33 ` John Garry
2026-10-02 8:47 ` Hannes Reinecke
2026-10-03 13:48 ` Martin K. Petersen (Oracle)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox