V4L/DVB: saa7134: add code to allow changing IR protocol
[safe/jmp/linux-2.6] / include / scsi / scsi_device.h
index 15b0926..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;
 
@@ -145,6 +148,7 @@ struct scsi_device {
        unsigned retry_hwerror:1;       /* Retry HARDWARE_ERROR */
        unsigned last_sector_bug:1;     /* do not use multisector accesses on
                                           SD_LAST_BUGGY_SECTORS */
+       unsigned is_visible:1;  /* is the device visible in sysfs */
 
        DECLARE_BITMAP(supported_events, SDEV_EVT_MAXBITS); /* supported events */
        struct list_head event_list;    /* asserted events */
@@ -174,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 */
@@ -185,12 +190,15 @@ 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 *);
 };
 
 struct scsi_dh_data {
        struct scsi_device_handler *scsi_dh;
+       struct scsi_device *sdev;
+       struct kref kref;
        char buf[0];
 };
 
@@ -340,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,
@@ -371,12 +380,6 @@ extern int scsi_execute_req(struct scsi_device *sdev, const unsigned char *cmd,
                            int data_direction, void *buffer, unsigned bufflen,
                            struct scsi_sense_hdr *, int timeout, int retries,
                            int *resid);
-extern int scsi_execute_async(struct scsi_device *sdev,
-                             const unsigned char *cmd, int cmd_len, int data_direction,
-                             void *buffer, unsigned bufflen, int use_sg,
-                             int timeout, int retries, void *privdata,
-                             void (*done)(void *, char *, int, int),
-                             gfp_t gfp);
 
 static inline int __must_check scsi_device_reprobe(struct scsi_device *sdev)
 {