scsi: core: add support for request batching
[linux-block.git] / include / scsi / scsi_host.h
index cc139dbd71e572b28bc3fe1ccdbf66c6128f7fc9..31e0d6ca1ebaa228091fe8a235d08392ae691c12 100644 (file)
@@ -80,8 +80,10 @@ struct scsi_host_template {
         * command block to the LLDD.  When the driver finished
         * processing the command the done callback is invoked.
         *
-        * If queuecommand returns 0, then the HBA has accepted the
-        * command.  The done() function must be called on the command
+        * If queuecommand returns 0, then the driver has accepted the
+        * command.  It must also push it to the HBA if the scsi_cmnd
+        * flag SCMD_LAST is set, or if the driver does not implement
+        * commit_rqs.  The done() function must be called on the command
         * when the driver has finished with it. (you may call done on the
         * command before queuecommand returns, but in this case you
         * *must* return 0 from queuecommand).
@@ -109,6 +111,16 @@ struct scsi_host_template {
         */
        int (* queuecommand)(struct Scsi_Host *, struct scsi_cmnd *);
 
+       /*
+        * The commit_rqs function is used to trigger a hardware
+        * doorbell after some requests have been queued with
+        * queuecommand, when an error is encountered before sending
+        * the request with SCMD_LAST set.
+        *
+        * STATUS: OPTIONAL
+        */
+       void (*commit_rqs)(struct Scsi_Host *, u16);
+
        /*
         * This is an error handling strategy routine.  You don't need to
         * define one of these if you don't want to - there is a default