VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git] / include / scsi / scsi_host.h
index 84a7065..2d3265c 100644 (file)
@@ -30,6 +30,12 @@ struct scsi_transport_template;
 #define DISABLE_CLUSTERING 0
 #define ENABLE_CLUSTERING 1
 
+enum scsi_eh_timer_return {
+       EH_NOT_HANDLED,
+       EH_HANDLED,
+       EH_RESET_TIMER,
+};
+
 
 struct scsi_host_template {
        struct module *module;
@@ -64,7 +70,7 @@ struct scsi_host_template {
         *
         * Status: OPTIONAL
         */
-       int (* ioctl)(struct scsi_device *dev, int cmd, void *arg);
+       int (* ioctl)(struct scsi_device *dev, int cmd, void __user *arg);
        
        /*
         * The queuecommand function is used to queue up a scsi
@@ -125,6 +131,20 @@ struct scsi_host_template {
        int (* eh_bus_reset_handler)(struct scsi_cmnd *);
        int (* eh_host_reset_handler)(struct scsi_cmnd *);
 
+       /*
+        * This is an optional routine to notify the host that the scsi
+        * timer just fired.  The returns tell the timer routine what to
+        * do about this:
+        *
+        * EH_HANDLED:          I fixed the error, please complete the command
+        * EH_RESET_TIMER:      I need more time, reset the timer and
+        *                      begin counting again
+        * EH_NOT_HANDLED       Begin normal error recovery
+        *
+        * Status: OPTIONAL
+        */
+       enum scsi_eh_timer_return (* eh_timed_out)(struct scsi_cmnd *);
+
        /*
         * Old EH handlers, no longer used. Make them warn the user of old
         * drivers by using a wrong type
@@ -151,7 +171,7 @@ struct scsi_host_template {
         * here then you will get a call to slave_configure(), then the
         * device will be used for however long it is kept around, then when
         * the device is removed from the system (or * possibly at reboot
-        * time), you will then get a call to slave_detach().  This is
+        * time), you will then get a call to slave_destroy().  This is
         * assuming you implement slave_configure and slave_destroy.
         * However, if you allocate memory and hang it off the device struct,
         * then you must implement the slave_destroy() routine at a minimum
@@ -185,7 +205,7 @@ struct scsi_host_template {
         *     specific setup basis...
         * 6.  Return 0 on success, non-0 on error.  The device will be marked
         *     as offline on error so that no access will occur.  If you return
-        *     non-0, your slave_detach routine will never get called for this
+        *     non-0, your slave_destroy routine will never get called for this
         *     device, so don't leave any loose memory hanging around, clean
         *     up after yourself before returning non-0
         *
@@ -313,6 +333,11 @@ struct scsi_host_template {
         */
        unsigned emulated:1;
 
+       /*
+        * True if the low-level driver performs its own reset-settle delays.
+        */
+       unsigned skip_settle_delay:1;
+
        /*
         * Countdown for host blocking with no commands outstanding
         */