Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
[pandora-kernel.git] / include / scsi / scsi_host.h
index f1f2644..50266c9 100644 (file)
@@ -355,6 +355,19 @@ struct scsi_host_template {
         */
        enum blk_eh_timer_return (*eh_timed_out)(struct scsi_cmnd *);
 
+       /* This is an optional routine that allows transport to initiate
+        * LLD adapter or firmware reset using sysfs attribute.
+        *
+        * Return values: 0 on success, -ve value on failure.
+        *
+        * Status: OPTIONAL
+        */
+
+       int (*host_reset)(struct Scsi_Host *shost, int reset_type);
+#define SCSI_ADAPTER_RESET     1
+#define SCSI_FIRMWARE_RESET    2
+
+
        /*
         * Name of proc directory
         */
@@ -791,7 +804,8 @@ static inline struct device *scsi_get_device(struct Scsi_Host *shost)
  **/
 static inline int scsi_host_scan_allowed(struct Scsi_Host *shost)
 {
-       return shost->shost_state == SHOST_RUNNING;
+       return shost->shost_state == SHOST_RUNNING ||
+              shost->shost_state == SHOST_RECOVERY;
 }
 
 extern void scsi_unblock_requests(struct Scsi_Host *);