aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi/scsi_device.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-01-25 20:19:08 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-01-25 20:19:08 -0500
commit9b73e76f3cf63379dcf45fcd4f112f5812418d0a (patch)
tree4e6bef87cd0cd6d848fc39a5ae25b981dbbe035b /include/scsi/scsi_device.h
parent50d9a126240f9961cfdd063336bbeb91f77a7dce (diff)
parent23c3e290fb9ce38cabc2822b47583fc8702411bf (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (200 commits) [SCSI] usbstorage: use last_sector_bug flag universally [SCSI] libsas: abstract STP task status into a function [SCSI] ultrastor: clean up inline asm warnings [SCSI] aic7xxx: fix firmware build [SCSI] aacraid: fib context lock for management ioctls [SCSI] ch: remove forward declarations [SCSI] ch: fix device minor number management bug [SCSI] ch: handle class_device_create failure properly [SCSI] NCR5380: fix section mismatch [SCSI] sg: fix /proc/scsi/sg/devices when no SCSI devices [SCSI] IB/iSER: add logical unit reset support [SCSI] don't use __GFP_DMA for sense buffers if not required [SCSI] use dynamically allocated sense buffer [SCSI] scsi.h: add macro for enclosure bit of inquiry data [SCSI] sd: add fix for devices with last sector access problems [SCSI] fix pcmcia compile problem [SCSI] aacraid: add Voodoo Lite class of cards. [SCSI] aacraid: add new driver features flags [SCSI] qla2xxx: Update version number to 8.02.00-k7. [SCSI] qla2xxx: Issue correct MBC_INITIALIZE_FIRMWARE command. ...
Diffstat (limited to 'include/scsi/scsi_device.h')
-rw-r--r--include/scsi/scsi_device.h13
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 *);
297extern int scsi_test_unit_ready(struct scsi_device *sdev, int timeout, 298extern int scsi_test_unit_ready(struct scsi_device *sdev, int timeout,
298 int retries); 299 int retries, struct scsi_sense_hdr *sshdr);
299extern int scsi_device_set_state(struct scsi_device *sdev, 300extern int scsi_device_set_state(struct scsi_device *sdev,
300 enum scsi_device_state state); 301 enum scsi_device_state state);
301extern struct scsi_event *sdev_evt_alloc(enum scsi_device_event evt_type, 302extern 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}
390static 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) "*")