*参照元 [#w2f3a02b] #backlinks *説明 [#s046159a] -パス: [[linux-2.6.25/include/scsi/scsi_device.h]] -FIXME: これは何? --説明 **参考 [#n85debc9] *実装 [#zbda078b] struct scsi_device { struct Scsi_Host *host; - --[[linux-2.6.25/Scsi_Host]] struct request_queue *request_queue; - --[[linux-2.6.25/request_queue]] /* the next two are protected by the host->host_lock */ struct list_head siblings; /* list of all devices on this host */ struct list_head same_target_siblings; /* just the devices sharing same target id */ - --[[linux-2.6.25/list_head]] /* this is now protected by the request_queue->queue_lock */ unsigned int device_busy; /* commands actually active on * low-level. protected by queue_lock. */ spinlock_t list_lock; - --[[linux-2.6.25/spinlock_t]] struct list_head cmd_list; /* queue of in use SCSI Command structures */ struct list_head starved_entry; struct scsi_cmnd *current_cmnd; /* currently active command */ - --[[linux-2.6.25/scsi_cmnd]] unsigned short queue_depth; /* How deep of a queue we want */ 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 int id, lun, channel; unsigned int manufacturer; /* Manufacturer of device, for using * vendor-specific cmd's */ unsigned sector_size; /* size in bytes */ void *hostdata; /* available to low-level driver */ char type; char scsi_level; char inq_periph_qual; /* PQ from INQUIRY data */ unsigned char inquiry_len; /* valid bytes in 'inquiry' */ unsigned char * inquiry; /* INQUIRY response data */ const char * vendor; /* [back_compat] point into 'inquiry' ... */ const char * model; /* ... after scan; point to static string */ const char * rev; /* ... "nullnullnullnull" before scan */ unsigned char current_tag; /* current tag */ struct scsi_target *sdev_target; /* used only for single_lun */ - --[[linux-2.6.25/scsi_target]] unsigned int sdev_bflags; /* black/white flags as also found in * scsi_devinfo.[hc]. For now used only to * pass settings from slave_alloc to scsi * core. */ unsigned writeable:1; unsigned removable:1; unsigned changed:1; /* Data invalid due to media change */ unsigned busy:1; /* Used to prevent races */ unsigned lockable:1; /* Able to prevent media removal */ unsigned locked:1; /* Media removal disabled */ unsigned borken:1; /* Tell the Seagate driver to be * painfully slow on this device */ unsigned disconnect:1; /* can disconnect */ unsigned soft_reset:1; /* Uses soft reset option */ unsigned sdtr:1; /* Device supports SDTR messages */ unsigned wdtr:1; /* Device supports WDTR messages */ unsigned ppr:1; /* Device supports PPR messages */ unsigned tagged_supported:1; /* Supports SCSI-II tagged queuing */ unsigned simple_tags:1; /* simple queue tag messages are enabled */ unsigned ordered_tags:1;/* ordered queue tag messages are enabled */ unsigned was_reset:1; /* There was a bus reset on the bus for * this device */ unsigned expecting_cc_ua:1; /* Expecting a CHECK_CONDITION/UNIT_ATTN * because we did a bus reset. */ unsigned use_10_for_rw:1; /* first try 10-byte read / write */ unsigned use_10_for_ms:1; /* first try 10-byte mode sense/select */ unsigned skip_ms_page_8:1; /* do not use MODE SENSE page 0x08 */ unsigned skip_ms_page_3f:1; /* do not use MODE SENSE page 0x3f */ unsigned use_192_bytes_for_3f:1; /* ask for 192 bytes from page 0x3f */ unsigned no_start_on_add:1; /* do not issue start on add */ unsigned allow_restart:1; /* issue START_UNIT in error handler */ unsigned manage_start_stop:1; /* Let HLD (sd) manage start/stop */ unsigned no_uld_attach:1; /* disable connecting to upper level drivers */ unsigned select_no_atn:1; unsigned fix_capacity:1; /* READ_CAPACITY is too high by 1 */ unsigned guess_capacity:1; /* READ_CAPACITY might be too high by 1 */ unsigned retry_hwerror:1; /* Retry HARDWARE_ERROR */ unsigned last_sector_bug:1; /* Always read last sector in a 1 sector read */ DECLARE_BITMAP(supported_events, SDEV_EVT_MAXBITS); /* supported events */ - --[[linux-2.6.25/DECLARE_BITMAP]] struct list_head event_list; /* asserted events */ struct work_struct event_work; - --[[linux-2.6.25/work_struct]] unsigned int device_blocked; /* Device returned QUEUE_FULL. */ unsigned int max_device_blocked; /* what device_blocked counts down from */ #define SCSI_DEFAULT_DEVICE_BLOCKED 3 atomic_t iorequest_cnt; atomic_t iodone_cnt; atomic_t ioerr_cnt; - --[[linux-2.6.25/atomic_t]] int timeout; struct device sdev_gendev; - --[[linux-2.6.25/device]] struct class_device sdev_classdev; - --[[linux-2.6.25/class_device]] struct execute_work ew; /* used to get process context on put */ - --[[linux-2.6.25/execute_work]] enum scsi_device_state sdev_state; - --[[linux-2.6.25/scsi_device_state]] unsigned long sdev_data[0]; } __attribute__((aligned(sizeof(unsigned long)))); *コメント [#y4405a29]