Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [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 | ****************************************************************************/ |
| 19 | #ifndef _LINUX_VIRTIO_SCSI_H |
| 20 | #define _LINUX_VIRTIO_SCSI_H |
| 21 | #include <linux/virtio_types.h> |
| 22 | #define VIRTIO_SCSI_CDB_DEFAULT_SIZE 32 |
| 23 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 24 | #define VIRTIO_SCSI_SENSE_DEFAULT_SIZE 96 |
| 25 | #ifndef VIRTIO_SCSI_CDB_SIZE |
| 26 | #define VIRTIO_SCSI_CDB_SIZE VIRTIO_SCSI_CDB_DEFAULT_SIZE |
| 27 | #endif |
| 28 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 29 | #ifndef VIRTIO_SCSI_SENSE_SIZE |
| 30 | #define VIRTIO_SCSI_SENSE_SIZE VIRTIO_SCSI_SENSE_DEFAULT_SIZE |
| 31 | #endif |
| 32 | struct virtio_scsi_cmd_req { |
| 33 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 34 | __u8 lun[8]; |
| 35 | __virtio64 tag; |
| 36 | __u8 task_attr; |
| 37 | __u8 prio; |
| 38 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 39 | __u8 crn; |
| 40 | __u8 cdb[VIRTIO_SCSI_CDB_SIZE]; |
| 41 | } __attribute__((packed)); |
| 42 | struct virtio_scsi_cmd_req_pi { |
| 43 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 44 | __u8 lun[8]; |
| 45 | __virtio64 tag; |
| 46 | __u8 task_attr; |
| 47 | __u8 prio; |
| 48 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 49 | __u8 crn; |
| 50 | __virtio32 pi_bytesout; |
| 51 | __virtio32 pi_bytesin; |
| 52 | __u8 cdb[VIRTIO_SCSI_CDB_SIZE]; |
| 53 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 54 | } __attribute__((packed)); |
| 55 | struct virtio_scsi_cmd_resp { |
| 56 | __virtio32 sense_len; |
| 57 | __virtio32 resid; |
| 58 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 59 | __virtio16 status_qualifier; |
| 60 | __u8 status; |
| 61 | __u8 response; |
| 62 | __u8 sense[VIRTIO_SCSI_SENSE_SIZE]; |
| 63 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 64 | } __attribute__((packed)); |
| 65 | struct virtio_scsi_ctrl_tmf_req { |
| 66 | __virtio32 type; |
| 67 | __virtio32 subtype; |
| 68 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 69 | __u8 lun[8]; |
| 70 | __virtio64 tag; |
| 71 | } __attribute__((packed)); |
| 72 | struct virtio_scsi_ctrl_tmf_resp { |
| 73 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 74 | __u8 response; |
| 75 | } __attribute__((packed)); |
| 76 | struct virtio_scsi_ctrl_an_req { |
| 77 | __virtio32 type; |
| 78 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 79 | __u8 lun[8]; |
| 80 | __virtio32 event_requested; |
| 81 | } __attribute__((packed)); |
| 82 | struct virtio_scsi_ctrl_an_resp { |
| 83 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 84 | __virtio32 event_actual; |
| 85 | __u8 response; |
| 86 | } __attribute__((packed)); |
| 87 | struct virtio_scsi_event { |
| 88 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 89 | __virtio32 event; |
| 90 | __u8 lun[8]; |
| 91 | __virtio32 reason; |
| 92 | } __attribute__((packed)); |
| 93 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 94 | struct virtio_scsi_config { |
| 95 | __u32 num_queues; |
| 96 | __u32 seg_max; |
| 97 | __u32 max_sectors; |
| 98 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 99 | __u32 cmd_per_lun; |
| 100 | __u32 event_info_size; |
| 101 | __u32 sense_size; |
| 102 | __u32 cdb_size; |
| 103 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 104 | __u16 max_channel; |
| 105 | __u16 max_target; |
| 106 | __u32 max_lun; |
| 107 | } __attribute__((packed)); |
| 108 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 109 | #define VIRTIO_SCSI_F_INOUT 0 |
| 110 | #define VIRTIO_SCSI_F_HOTPLUG 1 |
| 111 | #define VIRTIO_SCSI_F_CHANGE 2 |
| 112 | #define VIRTIO_SCSI_F_T10_PI 3 |
| 113 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 114 | #define VIRTIO_SCSI_S_OK 0 |
| 115 | #define VIRTIO_SCSI_S_OVERRUN 1 |
| 116 | #define VIRTIO_SCSI_S_ABORTED 2 |
| 117 | #define VIRTIO_SCSI_S_BAD_TARGET 3 |
| 118 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 119 | #define VIRTIO_SCSI_S_RESET 4 |
| 120 | #define VIRTIO_SCSI_S_BUSY 5 |
| 121 | #define VIRTIO_SCSI_S_TRANSPORT_FAILURE 6 |
| 122 | #define VIRTIO_SCSI_S_TARGET_FAILURE 7 |
| 123 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 124 | #define VIRTIO_SCSI_S_NEXUS_FAILURE 8 |
| 125 | #define VIRTIO_SCSI_S_FAILURE 9 |
| 126 | #define VIRTIO_SCSI_S_FUNCTION_SUCCEEDED 10 |
| 127 | #define VIRTIO_SCSI_S_FUNCTION_REJECTED 11 |
| 128 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 129 | #define VIRTIO_SCSI_S_INCORRECT_LUN 12 |
| 130 | #define VIRTIO_SCSI_T_TMF 0 |
| 131 | #define VIRTIO_SCSI_T_AN_QUERY 1 |
| 132 | #define VIRTIO_SCSI_T_AN_SUBSCRIBE 2 |
| 133 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 134 | #define VIRTIO_SCSI_T_TMF_ABORT_TASK 0 |
| 135 | #define VIRTIO_SCSI_T_TMF_ABORT_TASK_SET 1 |
| 136 | #define VIRTIO_SCSI_T_TMF_CLEAR_ACA 2 |
| 137 | #define VIRTIO_SCSI_T_TMF_CLEAR_TASK_SET 3 |
| 138 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 139 | #define VIRTIO_SCSI_T_TMF_I_T_NEXUS_RESET 4 |
| 140 | #define VIRTIO_SCSI_T_TMF_LOGICAL_UNIT_RESET 5 |
| 141 | #define VIRTIO_SCSI_T_TMF_QUERY_TASK 6 |
| 142 | #define VIRTIO_SCSI_T_TMF_QUERY_TASK_SET 7 |
| 143 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 144 | #define VIRTIO_SCSI_T_EVENTS_MISSED 0x80000000 |
| 145 | #define VIRTIO_SCSI_T_NO_EVENT 0 |
| 146 | #define VIRTIO_SCSI_T_TRANSPORT_RESET 1 |
| 147 | #define VIRTIO_SCSI_T_ASYNC_NOTIFY 2 |
| 148 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 149 | #define VIRTIO_SCSI_T_PARAM_CHANGE 3 |
| 150 | #define VIRTIO_SCSI_EVT_RESET_HARD 0 |
| 151 | #define VIRTIO_SCSI_EVT_RESET_RESCAN 1 |
| 152 | #define VIRTIO_SCSI_EVT_RESET_REMOVED 2 |
| 153 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 154 | #define VIRTIO_SCSI_S_SIMPLE 0 |
| 155 | #define VIRTIO_SCSI_S_ORDERED 1 |
| 156 | #define VIRTIO_SCSI_S_HEAD 2 |
| 157 | #define VIRTIO_SCSI_S_ACA 3 |
| 158 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 159 | #endif |