scsi.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. #ifndef _SCSI_SCSI_H
  2. #define _SCSI_SCSI_H
  3. #define TEST_UNIT_READY 0x00
  4. #define REZERO_UNIT 0x01
  5. #define REQUEST_SENSE 0x03
  6. #define FORMAT_UNIT 0x04
  7. #define READ_BLOCK_LIMITS 0x05
  8. #define REASSIGN_BLOCKS 0x07
  9. #define READ_6 0x08
  10. #define WRITE_6 0x0a
  11. #define SEEK_6 0x0b
  12. #define READ_REVERSE 0x0f
  13. #define WRITE_FILEMARKS 0x10
  14. #define SPACE 0x11
  15. #define INQUIRY 0x12
  16. #define RECOVER_BUFFERED_DATA 0x14
  17. #define MODE_SELECT 0x15
  18. #define RESERVE 0x16
  19. #define RELEASE 0x17
  20. #define COPY 0x18
  21. #define ERASE 0x19
  22. #define MODE_SENSE 0x1a
  23. #define START_STOP 0x1b
  24. #define RECEIVE_DIAGNOSTIC 0x1c
  25. #define SEND_DIAGNOSTIC 0x1d
  26. #define ALLOW_MEDIUM_REMOVAL 0x1e
  27. #define SET_WINDOW 0x24
  28. #define READ_CAPACITY 0x25
  29. #define READ_10 0x28
  30. #define WRITE_10 0x2a
  31. #define SEEK_10 0x2b
  32. #define WRITE_VERIFY 0x2e
  33. #define VERIFY 0x2f
  34. #define SEARCH_HIGH 0x30
  35. #define SEARCH_EQUAL 0x31
  36. #define SEARCH_LOW 0x32
  37. #define SET_LIMITS 0x33
  38. #define PRE_FETCH 0x34
  39. #define READ_POSITION 0x34
  40. #define SYNCHRONIZE_CACHE 0x35
  41. #define LOCK_UNLOCK_CACHE 0x36
  42. #define READ_DEFECT_DATA 0x37
  43. #define MEDIUM_SCAN 0x38
  44. #define COMPARE 0x39
  45. #define COPY_VERIFY 0x3a
  46. #define WRITE_BUFFER 0x3b
  47. #define READ_BUFFER 0x3c
  48. #define UPDATE_BLOCK 0x3d
  49. #define READ_LONG 0x3e
  50. #define WRITE_LONG 0x3f
  51. #define CHANGE_DEFINITION 0x40
  52. #define WRITE_SAME 0x41
  53. #define READ_TOC 0x43
  54. #define LOG_SELECT 0x4c
  55. #define LOG_SENSE 0x4d
  56. #define MODE_SELECT_10 0x55
  57. #define RESERVE_10 0x56
  58. #define RELEASE_10 0x57
  59. #define MODE_SENSE_10 0x5a
  60. #define PERSISTENT_RESERVE_IN 0x5e
  61. #define PERSISTENT_RESERVE_OUT 0x5f
  62. #define MOVE_MEDIUM 0xa5
  63. #define READ_12 0xa8
  64. #define WRITE_12 0xaa
  65. #define WRITE_VERIFY_12 0xae
  66. #define SEARCH_HIGH_12 0xb0
  67. #define SEARCH_EQUAL_12 0xb1
  68. #define SEARCH_LOW_12 0xb2
  69. #define READ_ELEMENT_STATUS 0xb8
  70. #define SEND_VOLUME_TAG 0xb6
  71. #define WRITE_LONG_2 0xea
  72. #define GOOD 0x00
  73. #define CHECK_CONDITION 0x01
  74. #define CONDITION_GOOD 0x02
  75. #define BUSY 0x04
  76. #define INTERMEDIATE_GOOD 0x08
  77. #define INTERMEDIATE_C_GOOD 0x0a
  78. #define RESERVATION_CONFLICT 0x0c
  79. #define COMMAND_TERMINATED 0x11
  80. #define QUEUE_FULL 0x14
  81. #define STATUS_MASK 0x3e
  82. #define NO_SENSE 0x00
  83. #define RECOVERED_ERROR 0x01
  84. #define NOT_READY 0x02
  85. #define MEDIUM_ERROR 0x03
  86. #define HARDWARE_ERROR 0x04
  87. #define ILLEGAL_REQUEST 0x05
  88. #define UNIT_ATTENTION 0x06
  89. #define DATA_PROTECT 0x07
  90. #define BLANK_CHECK 0x08
  91. #define COPY_ABORTED 0x0a
  92. #define ABORTED_COMMAND 0x0b
  93. #define VOLUME_OVERFLOW 0x0d
  94. #define MISCOMPARE 0x0e
  95. #define TYPE_DISK 0x00
  96. #define TYPE_TAPE 0x01
  97. #define TYPE_PROCESSOR 0x03
  98. #define TYPE_WORM 0x04
  99. #define TYPE_ROM 0x05
  100. #define TYPE_SCANNER 0x06
  101. #define TYPE_MOD 0x07
  102. #define TYPE_MEDIUM_CHANGER 0x08
  103. #define TYPE_ENCLOSURE 0x0d
  104. #define TYPE_NO_LUN 0x7f
  105. #define COMMAND_COMPLETE 0x00
  106. #define EXTENDED_MESSAGE 0x01
  107. #define EXTENDED_MODIFY_DATA_POINTER 0x00
  108. #define EXTENDED_SDTR 0x01
  109. #define EXTENDED_EXTENDED_IDENTIFY 0x02
  110. #define EXTENDED_WDTR 0x03
  111. #define SAVE_POINTERS 0x02
  112. #define RESTORE_POINTERS 0x03
  113. #define DISCONNECT 0x04
  114. #define INITIATOR_ERROR 0x05
  115. #define ABORT 0x06
  116. #define MESSAGE_REJECT 0x07
  117. #define NOP 0x08
  118. #define MSG_PARITY_ERROR 0x09
  119. #define LINKED_CMD_COMPLETE 0x0a
  120. #define LINKED_FLG_CMD_COMPLETE 0x0b
  121. #define BUS_DEVICE_RESET 0x0c
  122. #define INITIATE_RECOVERY 0x0f
  123. #define RELEASE_RECOVERY 0x10
  124. #define SIMPLE_QUEUE_TAG 0x20
  125. #define HEAD_OF_QUEUE_TAG 0x21
  126. #define ORDERED_QUEUE_TAG 0x22
  127. #define SCSI_IOCTL_GET_IDLUN 0x5382
  128. #define SCSI_IOCTL_TAGGED_ENABLE 0x5383
  129. #define SCSI_IOCTL_TAGGED_DISABLE 0x5384
  130. #define SCSI_IOCTL_PROBE_HOST 0x5385
  131. #define SCSI_IOCTL_GET_BUS_NUMBER 0x5386
  132. struct ccs_modesel_head {
  133. unsigned char _r1;
  134. unsigned char medium;
  135. unsigned char _r2;
  136. unsigned char block_desc_length;
  137. unsigned char density;
  138. unsigned char number_blocks_hi;
  139. unsigned char number_blocks_med;
  140. unsigned char number_blocks_lo;
  141. unsigned char _r3;
  142. unsigned char block_length_hi;
  143. unsigned char block_length_med;
  144. unsigned char block_length_lo;
  145. };
  146. #endif