diff options
Diffstat (limited to 'include/scsi/scsi_device.h')
| -rw-r--r-- | include/scsi/scsi_device.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 9af48cbf0036..7c4449900c24 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h | |||
| @@ -81,11 +81,14 @@ struct scsi_device { | |||
| 81 | struct list_head starved_entry; | 81 | struct list_head starved_entry; |
| 82 | struct scsi_cmnd *current_cmnd; /* currently active command */ | 82 | struct scsi_cmnd *current_cmnd; /* currently active command */ |
| 83 | unsigned short queue_depth; /* How deep of a queue we want */ | 83 | unsigned short queue_depth; /* How deep of a queue we want */ |
| 84 | unsigned short max_queue_depth; /* max queue depth */ | ||
| 84 | unsigned short last_queue_full_depth; /* These two are used by */ | 85 | unsigned short last_queue_full_depth; /* These two are used by */ |
| 85 | unsigned short last_queue_full_count; /* scsi_track_queue_full() */ | 86 | unsigned short last_queue_full_count; /* scsi_track_queue_full() */ |
| 86 | unsigned long last_queue_full_time;/* don't let QUEUE_FULLs on the same | 87 | unsigned long last_queue_full_time; /* last queue full time */ |
| 87 | jiffie count on our counter, they | 88 | unsigned long queue_ramp_up_period; /* ramp up period in jiffies */ |
| 88 | could all be from the same event. */ | 89 | #define SCSI_DEFAULT_RAMP_UP_PERIOD (120 * HZ) |
| 90 | |||
| 91 | unsigned long last_queue_ramp_up; /* last queue ramp up time */ | ||
| 89 | 92 | ||
| 90 | unsigned int id, lun, channel; | 93 | unsigned int id, lun, channel; |
| 91 | 94 | ||
| @@ -145,6 +148,7 @@ struct scsi_device { | |||
| 145 | unsigned retry_hwerror:1; /* Retry HARDWARE_ERROR */ | 148 | unsigned retry_hwerror:1; /* Retry HARDWARE_ERROR */ |
| 146 | unsigned last_sector_bug:1; /* do not use multisector accesses on | 149 | unsigned last_sector_bug:1; /* do not use multisector accesses on |
| 147 | SD_LAST_BUGGY_SECTORS */ | 150 | SD_LAST_BUGGY_SECTORS */ |
| 151 | unsigned is_visible:1; /* is the device visible in sysfs */ | ||
| 148 | 152 | ||
| 149 | DECLARE_BITMAP(supported_events, SDEV_EVT_MAXBITS); /* supported events */ | 153 | DECLARE_BITMAP(supported_events, SDEV_EVT_MAXBITS); /* supported events */ |
| 150 | struct list_head event_list; /* asserted events */ | 154 | struct list_head event_list; /* asserted events */ |
| @@ -174,6 +178,7 @@ struct scsi_dh_devlist { | |||
| 174 | char *model; | 178 | char *model; |
| 175 | }; | 179 | }; |
| 176 | 180 | ||
| 181 | typedef void (*activate_complete)(void *, int); | ||
| 177 | struct scsi_device_handler { | 182 | struct scsi_device_handler { |
| 178 | /* Used by the infrastructure */ | 183 | /* Used by the infrastructure */ |
| 179 | struct list_head list; /* list of scsi_device_handlers */ | 184 | struct list_head list; /* list of scsi_device_handlers */ |
| @@ -185,7 +190,7 @@ struct scsi_device_handler { | |||
| 185 | int (*check_sense)(struct scsi_device *, struct scsi_sense_hdr *); | 190 | int (*check_sense)(struct scsi_device *, struct scsi_sense_hdr *); |
| 186 | int (*attach)(struct scsi_device *); | 191 | int (*attach)(struct scsi_device *); |
| 187 | void (*detach)(struct scsi_device *); | 192 | void (*detach)(struct scsi_device *); |
| 188 | int (*activate)(struct scsi_device *); | 193 | int (*activate)(struct scsi_device *, activate_complete, void *); |
| 189 | int (*prep_fn)(struct scsi_device *, struct request *); | 194 | int (*prep_fn)(struct scsi_device *, struct request *); |
| 190 | int (*set_params)(struct scsi_device *, const char *); | 195 | int (*set_params)(struct scsi_device *, const char *); |
| 191 | }; | 196 | }; |
