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 6c2d80b36aa1..ab7acbe80960 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h | |||
@@ -122,9 +122,6 @@ struct scsi_device { | |||
122 | unsigned tagged_supported:1; /* Supports SCSI-II tagged queuing */ | 122 | unsigned tagged_supported:1; /* Supports SCSI-II tagged queuing */ |
123 | unsigned simple_tags:1; /* simple queue tag messages are enabled */ | 123 | unsigned simple_tags:1; /* simple queue tag messages are enabled */ |
124 | unsigned ordered_tags:1;/* ordered queue tag messages are enabled */ | 124 | unsigned ordered_tags:1;/* ordered queue tag messages are enabled */ |
125 | unsigned single_lun:1; /* Indicates we should only allow I/O to | ||
126 | * one of the luns for the device at a | ||
127 | * time. */ | ||
128 | unsigned was_reset:1; /* There was a bus reset on the bus for | 125 | unsigned was_reset:1; /* There was a bus reset on the bus for |
129 | * this device */ | 126 | * this device */ |
130 | unsigned expecting_cc_ua:1; /* Expecting a CHECK_CONDITION/UNIT_ATTN | 127 | unsigned expecting_cc_ua:1; /* Expecting a CHECK_CONDITION/UNIT_ATTN |
@@ -142,6 +139,7 @@ struct scsi_device { | |||
142 | unsigned fix_capacity:1; /* READ_CAPACITY is too high by 1 */ | 139 | unsigned fix_capacity:1; /* READ_CAPACITY is too high by 1 */ |
143 | unsigned guess_capacity:1; /* READ_CAPACITY might be too high by 1 */ | 140 | unsigned guess_capacity:1; /* READ_CAPACITY might be too high by 1 */ |
144 | unsigned retry_hwerror:1; /* Retry HARDWARE_ERROR */ | 141 | unsigned retry_hwerror:1; /* Retry HARDWARE_ERROR */ |
142 | unsigned last_sector_bug:1; /* Always read last sector in a 1 sector read */ | ||
145 | 143 | ||
146 | DECLARE_BITMAP(supported_events, SDEV_EVT_MAXBITS); /* supported events */ | 144 | DECLARE_BITMAP(supported_events, SDEV_EVT_MAXBITS); /* supported events */ |
147 | struct list_head event_list; /* asserted events */ | 145 | struct list_head event_list; /* asserted events */ |
@@ -202,6 +200,9 @@ struct scsi_target { | |||
202 | unsigned int id; /* target id ... replace | 200 | unsigned int id; /* target id ... replace |
203 | * scsi_device.id eventually */ | 201 | * scsi_device.id eventually */ |
204 | unsigned int create:1; /* signal that it needs to be added */ | 202 | unsigned int create:1; /* signal that it needs to be added */ |
203 | unsigned int single_lun:1; /* Indicates we should only | ||
204 | * allow I/O to one of the luns | ||
205 | * for the device at a time. */ | ||
205 | unsigned int pdt_1f_for_no_lun; /* PDT = 0x1f */ | 206 | unsigned int pdt_1f_for_no_lun; /* PDT = 0x1f */ |
206 | /* means no lun present */ | 207 | /* means no lun present */ |
207 | 208 | ||
@@ -295,7 +296,7 @@ extern int scsi_mode_select(struct scsi_device *sdev, int pf, int sp, | |||
295 | struct scsi_mode_data *data, | 296 | struct scsi_mode_data *data, |
296 | struct scsi_sense_hdr *); | 297 | struct scsi_sense_hdr *); |
297 | extern int scsi_test_unit_ready(struct scsi_device *sdev, int timeout, | 298 | extern int scsi_test_unit_ready(struct scsi_device *sdev, int timeout, |
298 | int retries); | 299 | int retries, struct scsi_sense_hdr *sshdr); |
299 | extern int scsi_device_set_state(struct scsi_device *sdev, | 300 | extern int scsi_device_set_state(struct scsi_device *sdev, |
300 | enum scsi_device_state state); | 301 | enum scsi_device_state state); |
301 | extern struct scsi_event *sdev_evt_alloc(enum scsi_device_event evt_type, | 302 | extern struct scsi_event *sdev_evt_alloc(enum scsi_device_event evt_type, |
@@ -386,6 +387,10 @@ static inline int scsi_device_qas(struct scsi_device *sdev) | |||
386 | return 0; | 387 | return 0; |
387 | return sdev->inquiry[56] & 0x02; | 388 | return sdev->inquiry[56] & 0x02; |
388 | } | 389 | } |
390 | static inline int scsi_device_enclosure(struct scsi_device *sdev) | ||
391 | { | ||
392 | return sdev->inquiry[6] & (1<<6); | ||
393 | } | ||
389 | 394 | ||
390 | #define MODULE_ALIAS_SCSI_DEVICE(type) \ | 395 | #define MODULE_ALIAS_SCSI_DEVICE(type) \ |
391 | MODULE_ALIAS("scsi:t-" __stringify(type) "*") | 396 | MODULE_ALIAS("scsi:t-" __stringify(type) "*") |