Merge tag 'rtc-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux
[linux-2.6-microblaze.git] / include / scsi / scsi_host.h
index e30fd96..d0bf88d 100644 (file)
@@ -19,7 +19,6 @@ struct scsi_device;
 struct scsi_host_cmd_pool;
 struct scsi_target;
 struct Scsi_Host;
-struct scsi_host_cmd_pool;
 struct scsi_transport_template;
 
 
@@ -30,40 +29,15 @@ struct scsi_transport_template;
 #define MODE_TARGET 0x02
 
 struct scsi_host_template {
-       struct module *module;
-       const char *name;
-
        /*
-        * The info function will return whatever useful information the
-        * developer sees fit.  If not provided, then the name field will
-        * be used instead.
-        *
-        * Status: OPTIONAL
+        * Put fields referenced in IO submission path together in
+        * same cacheline
         */
-       const char *(* info)(struct Scsi_Host *);
 
        /*
-        * Ioctl interface
-        *
-        * Status: OPTIONAL
-        */
-       int (*ioctl)(struct scsi_device *dev, unsigned int cmd,
-                    void __user *arg);
-
-
-#ifdef CONFIG_COMPAT
-       /* 
-        * Compat handler. Handle 32bit ABI.
-        * When unknown ioctl is passed return -ENOIOCTLCMD.
-        *
-        * Status: OPTIONAL
+        * Additional per-command data allocated for the driver.
         */
-       int (*compat_ioctl)(struct scsi_device *dev, unsigned int cmd,
-                           void __user *arg);
-#endif
-
-       int (*init_cmd_priv)(struct Scsi_Host *shost, struct scsi_cmnd *cmd);
-       int (*exit_cmd_priv)(struct Scsi_Host *shost, struct scsi_cmnd *cmd);
+       unsigned int cmd_size;
 
        /*
         * The queuecommand function is used to queue up a scsi
@@ -111,6 +85,41 @@ struct scsi_host_template {
         */
        void (*commit_rqs)(struct Scsi_Host *, u16);
 
+       struct module *module;
+       const char *name;
+
+       /*
+        * The info function will return whatever useful information the
+        * developer sees fit.  If not provided, then the name field will
+        * be used instead.
+        *
+        * Status: OPTIONAL
+        */
+       const char *(*info)(struct Scsi_Host *);
+
+       /*
+        * Ioctl interface
+        *
+        * Status: OPTIONAL
+        */
+       int (*ioctl)(struct scsi_device *dev, unsigned int cmd,
+                    void __user *arg);
+
+
+#ifdef CONFIG_COMPAT
+       /*
+        * Compat handler. Handle 32bit ABI.
+        * When unknown ioctl is passed return -ENOIOCTLCMD.
+        *
+        * Status: OPTIONAL
+        */
+       int (*compat_ioctl)(struct scsi_device *dev, unsigned int cmd,
+                           void __user *arg);
+#endif
+
+       int (*init_cmd_priv)(struct Scsi_Host *shost, struct scsi_cmnd *cmd);
+       int (*exit_cmd_priv)(struct Scsi_Host *shost, struct scsi_cmnd *cmd);
+
        /*
         * 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
@@ -270,6 +279,16 @@ struct scsi_host_template {
         */
        int (* map_queues)(struct Scsi_Host *shost);
 
+       /*
+        * SCSI interface of blk_poll - poll for IO completions.
+        * Only applicable if SCSI LLD exposes multiple h/w queues.
+        *
+        * Return value: Number of completed entries found.
+        *
+        * Status: OPTIONAL
+        */
+       int (* mq_poll)(struct Scsi_Host *shost, unsigned int queue_num);
+
        /*
         * Check if scatterlists need to be padded for DMA draining.
         *
@@ -424,11 +443,6 @@ struct scsi_host_template {
         */
        unsigned supported_mode:2;
 
-       /*
-        * True if this host adapter uses unchecked DMA onto an ISA bus.
-        */
-       unsigned unchecked_isa_dma:1;
-
        /*
         * True for emulated SCSI host adapters (e.g. ATAPI).
         */
@@ -484,10 +498,6 @@ struct scsi_host_template {
         */
        u64 vendor_id;
 
-       /*
-        * Additional per-command data allocated for the driver.
-        */
-       unsigned int cmd_size;
        struct scsi_host_cmd_pool *cmd_pool;
 
        /* Delay for runtime autosuspend */
@@ -616,8 +626,8 @@ struct Scsi_Host {
         * the total queue depth is can_queue.
         */
        unsigned nr_hw_queues;
+       unsigned nr_maps;
        unsigned active_mode:2;
-       unsigned unchecked_isa_dma:1;
 
        /*
         * Host has requested that no further requests come through for the