123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417 |
- #ifndef _SCSI_SCSI_CHANGER_H
- #define _SCSI_SCSI_CHANGER_H 1
- struct scsi_exchange_medium {
- u_int8_t opcode;
- #define EXCHANGE_MEDIUM 0xa6
- u_int8_t byte2;
- u_int8_t tea[2];
- u_int8_t src[2];
- u_int8_t fdst[2];
- u_int8_t sdst[2];
- u_int8_t flags;
- #define EXCHANGE_MEDIUM_INV1 0x01
- #define EXCHANGE_MEDIUM_INV2 0x02
- u_int8_t control;
- };
- struct scsi_initialize_elememt_status {
- u_int8_t opcode;
- #define INITIALIZE_ELEMENT_STATUS 0x07
- u_int8_t byte2;
- u_int8_t reserved[3];
- u_int8_t control;
- };
- struct scsi_move_medium {
- u_int8_t opcode;
- #define MOVE_MEDIUM 0xa5
- u_int8_t byte2;
- u_int8_t tea[2];
- u_int8_t src[2];
- u_int8_t dst[2];
- u_int8_t reserved[2];
- u_int8_t flags;
- #define MOVE_MEDIUM_INVERT 0x01
- u_int8_t control;
- };
- struct scsi_position_to_element {
- u_int8_t opcode;
- #define POSITION_TO_ELEMENT 0x2b
- u_int8_t byte2;
- u_int8_t tea[2];
- u_int8_t dst[2];
- u_int8_t reserved[2];
- u_int8_t flags;
- #define POSITION_TO_ELEMENT_INVERT 0x01
- u_int8_t control;
- };
- struct scsi_read_element_status {
- u_int8_t opcode;
- #define READ_ELEMENT_STATUS 0xb8
- u_int8_t byte2;
- #define READ_ELEMENT_STATUS_VOLTAG 0x10
-
- u_int8_t sea[2];
- u_int8_t count[2];
- u_int8_t reserved0;
- u_int8_t len[3];
- u_int8_t reserved1;
- u_int8_t control;
- };
- struct scsi_request_volume_element_address {
- u_int8_t opcode;
- #define REQUEST_VOLUME_ELEMENT_ADDRESS 0xb5
- u_int8_t byte2;
- #define REQUEST_VOLUME_ELEMENT_ADDRESS_VOLTAG 0x10
-
- u_int8_t eaddr[2];
- u_int8_t count[2];
- u_int8_t reserved0;
- u_int8_t len[3];
- u_int8_t reserved1;
- u_int8_t control;
- };
- struct read_element_status_header {
- u_int8_t fear[2];
- u_int8_t count[2];
- u_int8_t reserved;
- u_int8_t nbytes[3];
- };
- struct read_element_status_page_header {
- u_int8_t type;
- u_int8_t flags;
- #define READ_ELEMENT_STATUS_AVOLTAG 0x40
- #define READ_ELEMENT_STATUS_PVOLTAG 0x80
- u_int8_t edl[2];
- u_int8_t reserved;
- u_int8_t nbytes[3];
- };
- struct volume_tag {
- u_int8_t vif[32];
- u_int8_t reserved[2];
- u_int8_t vsn[2];
- };
- struct read_element_status_descriptor {
- u_int8_t eaddr[2];
- u_int8_t flags1;
- #define READ_ELEMENT_STATUS_FULL 0x01
- #define READ_ELEMENT_STATUS_IMPEXP 0x02
- #define READ_ELEMENT_STATUS_EXCEPT 0x04
- #define READ_ELEMENT_STATUS_ACCESS 0x08
- #define READ_ELEMENT_STATUS_EXENAB 0x10
- #define READ_ELEMENT_STATUS_INENAB 0x20
- #define READ_ELEMENT_STATUS_MT_MASK1 0x05
- #define READ_ELEMENT_STATUS_ST_MASK1 0x0c
- #define READ_ELEMENT_STATUS_IE_MASK1 0x3f
- #define READ_ELEMENT_STATUS_DT_MASK1 0x0c
- u_int8_t reserved0;
- u_int8_t sense_code;
- u_int8_t sense_qual;
-
- u_int8_t dt_scsi_flags;
- #define READ_ELEMENT_STATUS_DT_LUNMASK 0x07
- #define READ_ELEMENT_STATUS_DT_LUVALID 0x10
- #define READ_ELEMENT_STATUS_DT_IDVALID 0x20
- #define READ_ELEMENT_STATUS_DT_NOTBUS 0x80
- u_int8_t dt_scsi_addr;
- u_int8_t reserved1;
- u_int8_t flags2;
- #define READ_ELEMENT_STATUS_INVERT 0x40
- #define READ_ELEMENT_STATUS_SVALID 0x80
- u_int8_t ssea[2];
-
- struct volume_tag pvoltag;
- struct volume_tag avoltag;
-
- };
- #define ELEMENT_TYPE_MASK 0x0f
- #define ELEMENT_TYPE_ALL 0x00
- #define ELEMENT_TYPE_MT 0x01
- #define ELEMENT_TYPE_ST 0x02
- #define ELEMENT_TYPE_IE 0x03
- #define ELEMENT_TYPE_DT 0x04
- #define PGCODE_MASK 0x3f
- #define PGCODE_PS 0x80
- struct page_device_capabilities {
- u_int8_t pg_code;
- u_int8_t pg_length;
-
- u_int8_t stor;
- #define STOR_MT 0x01
- #define STOR_ST 0x02
- #define STOR_IE 0x04
- #define STOR_DT 0x08
- u_int8_t reserved0;
-
- u_int8_t move_from_mt;
- u_int8_t move_from_st;
- u_int8_t move_from_ie;
- u_int8_t move_from_dt;
- #define MOVE_TO_MT 0x01
- #define MOVE_TO_ST 0x02
- #define MOVE_TO_IE 0x04
- #define MOVE_TO_DT 0x08
- u_int8_t reserved1[2];
-
- u_int8_t exchange_with_mt;
- u_int8_t exchange_with_st;
- u_int8_t exchange_with_ie;
- u_int8_t exchange_with_dt;
- #define EXCHANGE_WITH_MT 0x01
- #define EXCHANGE_WITH_ST 0x02
- #define EXCHANGE_WITH_IE 0x04
- #define EXCHANGE_WITH_DT 0x08
- };
- struct page_element_address_assignment {
- u_int8_t pg_code;
- u_int8_t pg_length;
-
- u_int8_t mtea[2];
-
- u_int8_t nmte[2];
-
- u_int8_t fsea[2];
-
- u_int8_t nse[2];
-
- u_int8_t fieea[2];
-
- u_int8_t niee[2];
-
- u_int8_t fdtea[2];
-
- u_int8_t ndte[2];
- u_int8_t reserved[2];
- };
- struct page_transport_geometry_parameters {
- u_int8_t pg_code;
- u_int8_t pg_length;
-
- u_int8_t misc;
- #define CAN_ROTATE 0x01
-
- u_int8_t member;
- };
- #endif
|