linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi_mid_low_api.txt
@ 2003-04-27 11:11 Andries.Brouwer
  2003-04-29  0:14 ` Douglas Gilbert
  0 siblings, 1 reply; 2+ messages in thread
From: Andries.Brouwer @ 2003-04-27 11:11 UTC (permalink / raw)
  To: dgilbert; +Cc: James.Bottomley, linux-kernel, linux-scsi

The specification says that slave_configure() has to call
scsi_adjust_queue_depth(). This is false, and moreover
does not always happen in the current tree.
(I was interested since I plan to add a slave_configure()
that will not call scsi_adjust_queue_depth().)

So, the patch below adapts scsi_mid_low_api.txt a little.

Andries

----------------------------------------------------------

diff -u --recursive --new-file -X /linux/dontdiff a/Documentation/scsi/scsi_mid_low_api.txt b/Documentation/scsi/scsi_mid_low_api.txt
--- a/Documentation/scsi/scsi_mid_low_api.txt	Mon Feb 24 23:02:44 2003
+++ b/Documentation/scsi/scsi_mid_low_api.txt	Sun Apr 27 12:58:21 2003
@@ -134,7 +134,7 @@
                     slave_configure() -->  scsi_adjust_queue_depth()
 			 |
 		    slave_alloc()
-                    slave_configure() -->  scsi_adjust_queue_depth()
+                    slave_configure()
 			 |
 		    slave_alloc()
                     slave_configure() -->  scsi_adjust_queue_depth()
@@ -142,8 +142,9 @@
 		    slave_alloc()   **
                     slave_destroy() **
 
-The invocation of scsi_adjust_queue_depth() by the LLD is required
-if slave_configure() is supplied.
+If the LLD wants to adjust the default queue settings, it can invoke
+scsi_adjust_queue_depth() in its slave_configure() routine.
+
 ** For scsi devices that the mid level tries to scan but do not
    respond, a slave_alloc(), slave_destroy() pair is called.
 
@@ -199,7 +200,7 @@
                             |                scsi_register()
                             |
 		      slave_alloc()
-                      slave_configure()  -->  scsi_adjust_queue_depth()
+                      slave_configure()
 		      slave_alloc()   **
 		      slave_destroy() **
                             |
@@ -208,9 +209,10 @@
 		      slave_alloc()   **
 		      slave_destroy() **
 
-If the LLD does not supply a slave_configure() then the mid level invokes
-scsi_adjust_queue_depth() itself with tagged queuing off and "cmd_per_lun"
-for that host as the queue length.
+The mid level invokes scsi_adjust_queue_depth() with tagged queuing off and
+"cmd_per_lun" for that host as the queue length. These settings can be
+overridden by a slave_configure() supplied by the LLD.
+
 ** For scsi devices that the mid level tries to scan but do not
    respond, a slave_alloc(), slave_destroy() pair is called.
 
@@ -903,11 +905,6 @@
  *      Notes: Allows the driver to inspect the response to the initial
  *	INQUIRY done by the scanning code and take appropriate action.
  *	For more details see the hosts.h file.
- *	If this function is not supplied, the mid level will call
- *	scsi_adjust_queue_depth() with the struct Scsi_Host::cmd_per_lun
- *	value on behalf of the given device. If this function is
- *	supplied then its implementation must call
- *	scsi_adjust_queue_depth(). 	
  **/
     int slave_configure(struct scsi_device *sdp);
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] scsi_mid_low_api.txt
  2003-04-27 11:11 [PATCH] scsi_mid_low_api.txt Andries.Brouwer
@ 2003-04-29  0:14 ` Douglas Gilbert
  0 siblings, 0 replies; 2+ messages in thread
From: Douglas Gilbert @ 2003-04-29  0:14 UTC (permalink / raw)
  To: Andries.Brouwer; +Cc: dgilbert, James.Bottomley, linux-kernel, linux-scsi

Andries.Brouwer@cwi.nl wrote:
> The specification says that slave_configure() has to call
> scsi_adjust_queue_depth(). This is false, and moreover
> does not always happen in the current tree.
> (I was interested since I plan to add a slave_configure()
> that will not call scsi_adjust_queue_depth().)
> 
> So, the patch below adapts scsi_mid_low_api.txt a little.


Andries,
I applied your patch to my version which is found at:
http://www.torque.net/scsi/scsi_mid_low_api.txt.gz

It describes some changes from Mike Anderson
and others that are not yet in the kernel (e.g. a full
implementation of scsi_set_device_offline() ). That is
why it hasn't been presented as a patch yet.

Thanks for the feedback.

Doug Gilbert



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-04-29  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-27 11:11 [PATCH] scsi_mid_low_api.txt Andries.Brouwer
2003-04-29  0:14 ` Douglas Gilbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).