V4L/DVB: saa7134: add code to allow changing IR protocol
[safe/jmp/linux-2.6] / include / scsi / scsi_device.h
index f097ae3..d80b6db 100644 (file)
@@ -81,11 +81,14 @@ struct scsi_device {
        struct list_head starved_entry;
        struct scsi_cmnd *current_cmnd; /* currently active command */
        unsigned short queue_depth;     /* How deep of a queue we want */
+       unsigned short max_queue_depth; /* max queue depth */
        unsigned short last_queue_full_depth; /* These two are used by */
        unsigned short last_queue_full_count; /* scsi_track_queue_full() */
-       unsigned long last_queue_full_time;/* don't let QUEUE_FULLs on the same
-                                          jiffie count on our counter, they
-                                          could all be from the same event. */
+       unsigned long last_queue_full_time;     /* last queue full time */
+       unsigned long queue_ramp_up_period;     /* ramp up period in jiffies */
+#define SCSI_DEFAULT_RAMP_UP_PERIOD    (120 * HZ)
+
+       unsigned long last_queue_ramp_up;       /* last queue ramp up time */
 
        unsigned int id, lun, channel;
 
@@ -175,6 +178,7 @@ struct scsi_dh_devlist {
        char *model;
 };
 
+typedef void (*activate_complete)(void *, int);
 struct scsi_device_handler {
        /* Used by the infrastructure */
        struct list_head list; /* list of scsi_device_handlers */
@@ -186,7 +190,7 @@ struct scsi_device_handler {
        int (*check_sense)(struct scsi_device *, struct scsi_sense_hdr *);
        int (*attach)(struct scsi_device *);
        void (*detach)(struct scsi_device *);
-       int (*activate)(struct scsi_device *);
+       int (*activate)(struct scsi_device *, activate_complete, void *);
        int (*prep_fn)(struct scsi_device *, struct request *);
        int (*set_params)(struct scsi_device *, const char *);
 };
@@ -344,7 +348,8 @@ extern int scsi_mode_select(struct scsi_device *sdev, int pf, int sp,
                            struct scsi_sense_hdr *);
 extern int scsi_test_unit_ready(struct scsi_device *sdev, int timeout,
                                int retries, struct scsi_sense_hdr *sshdr);
-extern unsigned char *scsi_get_vpd_page(struct scsi_device *, u8 page);
+extern int scsi_get_vpd_page(struct scsi_device *, u8 page, unsigned char *buf,
+                            int buf_len);
 extern int scsi_device_set_state(struct scsi_device *sdev,
                                 enum scsi_device_state state);
 extern struct scsi_event *sdev_evt_alloc(enum scsi_device_event evt_type,