Christopher Ferris | 6048173 | 2015-09-17 21:22:44 -0700 | [diff] [blame] | 1 | /**************************************************************************** |
| 2 | **************************************************************************** |
| 3 | *** |
| 4 | *** This header was automatically generated from a Linux kernel header |
| 5 | *** of the same name, to make information necessary for userspace to |
| 6 | *** call into the kernel available to libc. It contains only constants, |
| 7 | *** structures, and macros generated from the original header, and thus, |
| 8 | *** contains no copyrightable information. |
| 9 | *** |
| 10 | *** To edit the content of this header, modify the corresponding |
| 11 | *** source file (e.g. under external/kernel-headers/original/) then |
| 12 | *** run bionic/libc/kernel/tools/update_all.py |
| 13 | *** |
| 14 | *** Any manual change here will be lost the next time this script will |
| 15 | *** be run. You've been warned! |
| 16 | *** |
| 17 | **************************************************************************** |
| 18 | ****************************************************************************/ |
Christopher Ferris | 5956b4e | 2016-07-20 12:28:56 -0700 | [diff] [blame] | 19 | #ifndef _SCSI_PROTO_H_ |
| 20 | #define _SCSI_PROTO_H_ |
Christopher Ferris | 6048173 | 2015-09-17 21:22:44 -0700 | [diff] [blame] | 21 | #include <linux/types.h> |
| 22 | #define TEST_UNIT_READY 0x00 |
Christopher Ferris | 6048173 | 2015-09-17 21:22:44 -0700 | [diff] [blame] | 23 | #define REZERO_UNIT 0x01 |
| 24 | #define REQUEST_SENSE 0x03 |
| 25 | #define FORMAT_UNIT 0x04 |
| 26 | #define READ_BLOCK_LIMITS 0x05 |
Christopher Ferris | 6048173 | 2015-09-17 21:22:44 -0700 | [diff] [blame] | 27 | #define REASSIGN_BLOCKS 0x07 |
| 28 | #define INITIALIZE_ELEMENT_STATUS 0x07 |
| 29 | #define READ_6 0x08 |
| 30 | #define WRITE_6 0x0a |
Christopher Ferris | 6048173 | 2015-09-17 21:22:44 -0700 | [diff] [blame] | 31 | #define SEEK_6 0x0b |
| 32 | #define READ_REVERSE 0x0f |
| 33 | #define WRITE_FILEMARKS 0x10 |
| 34 | #define SPACE 0x11 |
Christopher Ferris | 6048173 | 2015-09-17 21:22:44 -0700 | [diff] [blame] | 35 | #define INQUIRY 0x12 |
| 36 | #define RECOVER_BUFFERED_DATA 0x14 |
| 37 | #define MODE_SELECT 0x15 |
| 38 | #define RESERVE 0x16 |
Christopher Ferris | 6048173 | 2015-09-17 21:22:44 -0700 | [diff] [blame] | 39 | #define RELEASE 0x17 |
| 40 | #define COPY 0x18 |
| 41 | #define ERASE 0x19 |
| 42 | #define MODE_SENSE 0x1a |
Christopher Ferris | 6048173 | 2015-09-17 21:22:44 -0700 | [diff] [blame] | 43 | #define START_STOP 0x1b |
| 44 | #define RECEIVE_DIAGNOSTIC 0x1c |
| 45 | #define SEND_DIAGNOSTIC 0x1d |
| 46 | #define ALLOW_MEDIUM_REMOVAL 0x1e |
Christopher Ferris | 6048173 | 2015-09-17 21:22:44 -0700 | [diff] [blame] | 47 | #define READ_FORMAT_CAPACITIES 0x23 |
| 48 | #define SET_WINDOW 0x24 |
| 49 | #define READ_CAPACITY 0x25 |
| 50 | #define READ_10 0x28 |
Christopher Ferris | 6048173 | 2015-09-17 21:22:44 -0700 | [diff] [blame] | 51 | #define WRITE_10 0x2a |
| 52 | #define SEEK_10 0x2b |
| 53 | #define POSITION_TO_ELEMENT 0x2b |
| 54 | #define WRITE_VERIFY 0x2e |
Christopher Ferris | 6048173 | 2015-09-17 21:22:44 -0700 | [diff] [blame] | 55 | #define VERIFY 0x2f |
| 56 | #define SEARCH_HIGH 0x30 |
| 57 | #define SEARCH_EQUAL 0x31 |
| 58 | #define SEARCH_LOW 0x32 |
Christopher Ferris | 6048173 | 2015-09-17 21:22:44 -0700 | [diff] [blame] | 59 | #define SET_LIMITS 0x33 |
| 60 | #define PRE_FETCH 0x34 |
| 61 | #define READ_POSITION 0x34 |
| 62 | #define SYNCHRONIZE_CACHE 0x35 |
Christopher Ferris | 6048173 | 2015-09-17 21:22:44 -0700 | [diff] [blame] | 63 | #define LOCK_UNLOCK_CACHE 0x36 |
| 64 | #define READ_DEFECT_DATA 0x37 |
| 65 | #define MEDIUM_SCAN 0x38 |
| 66 | #define COMPARE 0x39 |
Christopher Ferris | 6048173 | 2015-09-17 21:22:44 -0700 | [diff] [blame] | 67 | #define COPY_VERIFY 0x3a |
| 68 | #define WRITE_BUFFER 0x3b |
| 69 | #define READ_BUFFER 0x3c |
| 70 | #define UPDATE_BLOCK 0x3d |
Christopher Ferris | 6048173 | 2015-09-17 21:22:44 -0700 | [diff] [blame] | 71 | #define READ_LONG 0x3e |
| 72 | #define WRITE_LONG 0x3f |
| 73 | #define CHANGE_DEFINITION 0x40 |
| 74 | #define WRITE_SAME 0x41 |
Christopher Ferris | 6048173 | 2015-09-17 21:22:44 -0700 | [diff] [blame] | 75 | #define UNMAP 0x42 |
| 76 | #define READ_TOC 0x43 |
| 77 | #define READ_HEADER 0x44 |
| 78 | #define GET_EVENT_STATUS_NOTIFICATION 0x4a |
Christopher Ferris | 6048173 | 2015-09-17 21:22:44 -0700 | [diff] [blame] | 79 | #define LOG_SELECT 0x4c |
| 80 | #define LOG_SENSE 0x4d |
| 81 | #define XDWRITEREAD_10 0x53 |
| 82 | #define MODE_SELECT_10 0x55 |
Christopher Ferris | 6048173 | 2015-09-17 21:22:44 -0700 | [diff] [blame] | 83 | #define RESERVE_10 0x56 |
| 84 | #define RELEASE_10 0x57 |
| 85 | #define MODE_SENSE_10 0x5a |
| 86 | #define PERSISTENT_RESERVE_IN 0x5e |
Christopher Ferris | 6048173 | 2015-09-17 21:22:44 -0700 | [diff] [blame] | 87 | #define PERSISTENT_RESERVE_OUT 0x5f |
| 88 | #define VARIABLE_LENGTH_CMD 0x7f |
| 89 | #define REPORT_LUNS 0xa0 |
| 90 | #define SECURITY_PROTOCOL_IN 0xa2 |
Christopher Ferris | 6048173 | 2015-09-17 21:22:44 -0700 | [diff] [blame] | 91 | #define MAINTENANCE_IN 0xa3 |
| 92 | #define MAINTENANCE_OUT 0xa4 |
| 93 | #define MOVE_MEDIUM 0xa5 |
| 94 | #define EXCHANGE_MEDIUM 0xa6 |
Christopher Ferris | 6048173 | 2015-09-17 21:22:44 -0700 | [diff] [blame] | 95 | #define READ_12 0xa8 |
Christopher Ferris | 5956b4e | 2016-07-20 12:28:56 -0700 | [diff] [blame] | 96 | #define SERVICE_ACTION_OUT_12 0xa9 |
Christopher Ferris | 6048173 | 2015-09-17 21:22:44 -0700 | [diff] [blame] | 97 | #define WRITE_12 0xaa |
| 98 | #define READ_MEDIA_SERIAL_NUMBER 0xab |
Christopher Ferris | 5956b4e | 2016-07-20 12:28:56 -0700 | [diff] [blame] | 99 | #define SERVICE_ACTION_IN_12 0xab |
| 100 | #define WRITE_VERIFY_12 0xae |
Christopher Ferris | 6048173 | 2015-09-17 21:22:44 -0700 | [diff] [blame] | 101 | #define VERIFY_12 0xaf |
| 102 | #define SEARCH_HIGH_12 0xb0 |
| 103 | #define SEARCH_EQUAL_12 0xb1 |
| 104 | #define SEARCH_LOW_12 0xb2 |
Christopher Ferris | 6048173 | 2015-09-17 21:22:44 -0700 | [diff] [blame] | 105 | #define SECURITY_PROTOCOL_OUT 0xb5 |
| 106 | #define READ_ELEMENT_STATUS 0xb8 |
| 107 | #define SEND_VOLUME_TAG 0xb6 |
| 108 | #define WRITE_LONG_2 0xea |
Christopher Ferris | 6048173 | 2015-09-17 21:22:44 -0700 | [diff] [blame] | 109 | #define EXTENDED_COPY 0x83 |
| 110 | #define RECEIVE_COPY_RESULTS 0x84 |
| 111 | #define ACCESS_CONTROL_IN 0x86 |
| 112 | #define ACCESS_CONTROL_OUT 0x87 |
Christopher Ferris | 6048173 | 2015-09-17 21:22:44 -0700 | [diff] [blame] | 113 | #define READ_16 0x88 |
| 114 | #define COMPARE_AND_WRITE 0x89 |
| 115 | #define WRITE_16 0x8a |
| 116 | #define READ_ATTRIBUTE 0x8c |
Christopher Ferris | 6048173 | 2015-09-17 21:22:44 -0700 | [diff] [blame] | 117 | #define WRITE_ATTRIBUTE 0x8d |
| 118 | #define VERIFY_16 0x8f |
| 119 | #define SYNCHRONIZE_CACHE_16 0x91 |
| 120 | #define WRITE_SAME_16 0x93 |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 121 | #define ZBC_OUT 0x94 |
| 122 | #define ZBC_IN 0x95 |
Christopher Ferris | 5956b4e | 2016-07-20 12:28:56 -0700 | [diff] [blame] | 123 | #define SERVICE_ACTION_BIDIRECTIONAL 0x9d |
| 124 | #define SERVICE_ACTION_IN_16 0x9e |
Christopher Ferris | 5956b4e | 2016-07-20 12:28:56 -0700 | [diff] [blame] | 125 | #define SERVICE_ACTION_OUT_16 0x9f |
Christopher Ferris | 6048173 | 2015-09-17 21:22:44 -0700 | [diff] [blame] | 126 | #define GOOD 0x00 |
| 127 | #define CHECK_CONDITION 0x01 |
| 128 | #define CONDITION_GOOD 0x02 |
Christopher Ferris | 6048173 | 2015-09-17 21:22:44 -0700 | [diff] [blame] | 129 | #define BUSY 0x04 |
| 130 | #define INTERMEDIATE_GOOD 0x08 |
| 131 | #define INTERMEDIATE_C_GOOD 0x0a |
| 132 | #define RESERVATION_CONFLICT 0x0c |
Christopher Ferris | 6048173 | 2015-09-17 21:22:44 -0700 | [diff] [blame] | 133 | #define COMMAND_TERMINATED 0x11 |
| 134 | #define QUEUE_FULL 0x14 |
| 135 | #define ACA_ACTIVE 0x18 |
| 136 | #define TASK_ABORTED 0x20 |
Christopher Ferris | 6048173 | 2015-09-17 21:22:44 -0700 | [diff] [blame] | 137 | #define STATUS_MASK 0xfe |
| 138 | #define NO_SENSE 0x00 |
| 139 | #define RECOVERED_ERROR 0x01 |
| 140 | #define NOT_READY 0x02 |
Christopher Ferris | 6048173 | 2015-09-17 21:22:44 -0700 | [diff] [blame] | 141 | #define MEDIUM_ERROR 0x03 |
| 142 | #define HARDWARE_ERROR 0x04 |
| 143 | #define ILLEGAL_REQUEST 0x05 |
| 144 | #define UNIT_ATTENTION 0x06 |
Christopher Ferris | 6048173 | 2015-09-17 21:22:44 -0700 | [diff] [blame] | 145 | #define DATA_PROTECT 0x07 |
| 146 | #define BLANK_CHECK 0x08 |
| 147 | #define COPY_ABORTED 0x0a |
| 148 | #define ABORTED_COMMAND 0x0b |
Christopher Ferris | 6048173 | 2015-09-17 21:22:44 -0700 | [diff] [blame] | 149 | #define VOLUME_OVERFLOW 0x0d |
| 150 | #define MISCOMPARE 0x0e |
| 151 | #define TYPE_DISK 0x00 |
| 152 | #define TYPE_TAPE 0x01 |
Christopher Ferris | 6048173 | 2015-09-17 21:22:44 -0700 | [diff] [blame] | 153 | #define TYPE_PRINTER 0x02 |
| 154 | #define TYPE_PROCESSOR 0x03 |
| 155 | #define TYPE_WORM 0x04 |
| 156 | #define TYPE_ROM 0x05 |
Christopher Ferris | 6048173 | 2015-09-17 21:22:44 -0700 | [diff] [blame] | 157 | #define TYPE_SCANNER 0x06 |
| 158 | #define TYPE_MOD 0x07 |
| 159 | #define TYPE_MEDIUM_CHANGER 0x08 |
| 160 | #define TYPE_COMM 0x09 |
Christopher Ferris | 6048173 | 2015-09-17 21:22:44 -0700 | [diff] [blame] | 161 | #define TYPE_RAID 0x0c |
| 162 | #define TYPE_ENCLOSURE 0x0d |
| 163 | #define TYPE_RBC 0x0e |
| 164 | #define TYPE_OSD 0x11 |
Christopher Ferris | 6048173 | 2015-09-17 21:22:44 -0700 | [diff] [blame] | 165 | #define TYPE_ZBC 0x14 |
| 166 | #define TYPE_WLUN 0x1e |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 167 | #define TYPE_NO_LUN 0x7f |
| 168 | #define SCSI_ACCESS_STATE_OPTIMAL 0x00 |
| 169 | #define SCSI_ACCESS_STATE_ACTIVE 0x01 |
| 170 | #define SCSI_ACCESS_STATE_STANDBY 0x02 |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 171 | #define SCSI_ACCESS_STATE_UNAVAILABLE 0x03 |
| 172 | #define SCSI_ACCESS_STATE_LBA 0x04 |
| 173 | #define SCSI_ACCESS_STATE_OFFLINE 0x0e |
| 174 | #define SCSI_ACCESS_STATE_TRANSITIONING 0x0f |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 175 | #define SCSI_ACCESS_STATE_MASK 0x0f |
| 176 | #define SCSI_ACCESS_STATE_PREFERRED 0x80 |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 177 | enum zbc_zone_reporting_options { |
| 178 | ZBC_ZONE_REPORTING_OPTION_ALL = 0, |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 179 | ZBC_ZONE_REPORTING_OPTION_EMPTY, |
| 180 | ZBC_ZONE_REPORTING_OPTION_IMPLICIT_OPEN, |
| 181 | ZBC_ZONE_REPORTING_OPTION_EXPLICIT_OPEN, |
| 182 | ZBC_ZONE_REPORTING_OPTION_CLOSED, |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 183 | ZBC_ZONE_REPORTING_OPTION_FULL, |
| 184 | ZBC_ZONE_REPORTING_OPTION_READONLY, |
| 185 | ZBC_ZONE_REPORTING_OPTION_OFFLINE, |
| 186 | ZBC_ZONE_REPORTING_OPTION_NEED_RESET_WP = 0x10, |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 187 | ZBC_ZONE_REPORTING_OPTION_NON_SEQWRITE, |
| 188 | ZBC_ZONE_REPORTING_OPTION_NON_WP = 0x3f, |
| 189 | }; |
| 190 | #define ZBC_REPORT_ZONE_PARTIAL 0x80 |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 191 | #endif |