Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | #ifndef _GDTH_IOCTL_H |
| 3 | #define _GDTH_IOCTL_H |
| 4 | |
| 5 | /* gdth_ioctl.h |
| 6 | * $Id: gdth_ioctl.h,v 1.14 2004/02/19 15:43:15 achim Exp $ |
| 7 | */ |
| 8 | |
| 9 | /* IOCTLs */ |
| 10 | #define GDTIOCTL_MASK ('J'<<8) |
| 11 | #define GDTIOCTL_GENERAL (GDTIOCTL_MASK | 0) /* general IOCTL */ |
| 12 | #define GDTIOCTL_DRVERS (GDTIOCTL_MASK | 1) /* get driver version */ |
| 13 | #define GDTIOCTL_CTRTYPE (GDTIOCTL_MASK | 2) /* get controller type */ |
| 14 | #define GDTIOCTL_OSVERS (GDTIOCTL_MASK | 3) /* get OS version */ |
| 15 | #define GDTIOCTL_HDRLIST (GDTIOCTL_MASK | 4) /* get host drive list */ |
| 16 | #define GDTIOCTL_CTRCNT (GDTIOCTL_MASK | 5) /* get controller count */ |
| 17 | #define GDTIOCTL_LOCKDRV (GDTIOCTL_MASK | 6) /* lock host drive */ |
| 18 | #define GDTIOCTL_LOCKCHN (GDTIOCTL_MASK | 7) /* lock channel */ |
| 19 | #define GDTIOCTL_EVENT (GDTIOCTL_MASK | 8) /* read controller events */ |
| 20 | #define GDTIOCTL_SCSI (GDTIOCTL_MASK | 9) /* SCSI command */ |
| 21 | #define GDTIOCTL_RESET_BUS (GDTIOCTL_MASK |10) /* reset SCSI bus */ |
| 22 | #define GDTIOCTL_RESCAN (GDTIOCTL_MASK |11) /* rescan host drives */ |
| 23 | #define GDTIOCTL_RESET_DRV (GDTIOCTL_MASK |12) /* reset (remote) drv. res. */ |
| 24 | |
| 25 | #define GDTIOCTL_MAGIC 0xaffe0004 |
| 26 | #define EVENT_SIZE 294 |
| 27 | #define GDTH_MAXSG 32 /* max. s/g elements */ |
| 28 | |
| 29 | #define MAX_LDRIVES 255 /* max. log. drive count */ |
| 30 | #ifdef GDTH_IOCTL_PROC |
| 31 | #define MAX_HDRIVES 100 /* max. host drive count */ |
| 32 | #else |
| 33 | #define MAX_HDRIVES MAX_LDRIVES /* max. host drive count */ |
| 34 | #endif |
| 35 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 36 | /* scatter/gather element */ |
| 37 | typedef struct { |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 38 | u32 sg_ptr; /* address */ |
| 39 | u32 sg_len; /* length */ |
| 40 | } __attribute__((packed)) gdth_sg_str; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 41 | |
| 42 | /* scatter/gather element - 64bit addresses */ |
| 43 | typedef struct { |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 44 | u64 sg_ptr; /* address */ |
| 45 | u32 sg_len; /* length */ |
| 46 | } __attribute__((packed)) gdth_sg64_str; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 47 | |
| 48 | /* command structure */ |
| 49 | typedef struct { |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 50 | u32 BoardNode; /* board node (always 0) */ |
| 51 | u32 CommandIndex; /* command number */ |
| 52 | u16 OpCode; /* the command (READ,..) */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 53 | union { |
| 54 | struct { |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 55 | u16 DeviceNo; /* number of cache drive */ |
| 56 | u32 BlockNo; /* block number */ |
| 57 | u32 BlockCnt; /* block count */ |
| 58 | u32 DestAddr; /* dest. addr. (if s/g: -1) */ |
| 59 | u32 sg_canz; /* s/g element count */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 60 | gdth_sg_str sg_lst[GDTH_MAXSG]; /* s/g list */ |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 61 | } __attribute__((packed)) cache; /* cache service cmd. str. */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 62 | struct { |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 63 | u16 DeviceNo; /* number of cache drive */ |
| 64 | u64 BlockNo; /* block number */ |
| 65 | u32 BlockCnt; /* block count */ |
| 66 | u64 DestAddr; /* dest. addr. (if s/g: -1) */ |
| 67 | u32 sg_canz; /* s/g element count */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 68 | gdth_sg64_str sg_lst[GDTH_MAXSG]; /* s/g list */ |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 69 | } __attribute__((packed)) cache64; /* cache service cmd. str. */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 70 | struct { |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 71 | u16 param_size; /* size of p_param buffer */ |
| 72 | u32 subfunc; /* IOCTL function */ |
| 73 | u32 channel; /* device */ |
| 74 | u64 p_param; /* buffer */ |
| 75 | } __attribute__((packed)) ioctl; /* IOCTL command structure */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 76 | struct { |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 77 | u16 reserved; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 78 | union { |
| 79 | struct { |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 80 | u32 msg_handle; /* message handle */ |
| 81 | u64 msg_addr; /* message buffer address */ |
| 82 | } __attribute__((packed)) msg; |
| 83 | u8 data[12]; /* buffer for rtc data, ... */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 84 | } su; |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 85 | } __attribute__((packed)) screen; /* screen service cmd. str. */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 86 | struct { |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 87 | u16 reserved; |
| 88 | u32 direction; /* data direction */ |
| 89 | u32 mdisc_time; /* disc. time (0: no timeout)*/ |
| 90 | u32 mcon_time; /* connect time(0: no to.) */ |
| 91 | u32 sdata; /* dest. addr. (if s/g: -1) */ |
| 92 | u32 sdlen; /* data length (bytes) */ |
| 93 | u32 clen; /* SCSI cmd. length(6,10,12) */ |
| 94 | u8 cmd[12]; /* SCSI command */ |
| 95 | u8 target; /* target ID */ |
| 96 | u8 lun; /* LUN */ |
| 97 | u8 bus; /* SCSI bus number */ |
| 98 | u8 priority; /* only 0 used */ |
| 99 | u32 sense_len; /* sense data length */ |
| 100 | u32 sense_data; /* sense data addr. */ |
| 101 | u32 link_p; /* linked cmds (not supp.) */ |
| 102 | u32 sg_ranz; /* s/g element count */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 103 | gdth_sg_str sg_lst[GDTH_MAXSG]; /* s/g list */ |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 104 | } __attribute__((packed)) raw; /* raw service cmd. struct. */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 105 | struct { |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 106 | u16 reserved; |
| 107 | u32 direction; /* data direction */ |
| 108 | u32 mdisc_time; /* disc. time (0: no timeout)*/ |
| 109 | u32 mcon_time; /* connect time(0: no to.) */ |
| 110 | u64 sdata; /* dest. addr. (if s/g: -1) */ |
| 111 | u32 sdlen; /* data length (bytes) */ |
| 112 | u32 clen; /* SCSI cmd. length(6,..,16) */ |
| 113 | u8 cmd[16]; /* SCSI command */ |
| 114 | u8 target; /* target ID */ |
| 115 | u8 lun; /* LUN */ |
| 116 | u8 bus; /* SCSI bus number */ |
| 117 | u8 priority; /* only 0 used */ |
| 118 | u32 sense_len; /* sense data length */ |
| 119 | u64 sense_data; /* sense data addr. */ |
| 120 | u32 sg_ranz; /* s/g element count */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 121 | gdth_sg64_str sg_lst[GDTH_MAXSG]; /* s/g list */ |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 122 | } __attribute__((packed)) raw64; /* raw service cmd. struct. */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 123 | } u; |
| 124 | /* additional variables */ |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 125 | u8 Service; /* controller service */ |
| 126 | u8 reserved; |
| 127 | u16 Status; /* command result */ |
| 128 | u32 Info; /* additional information */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 129 | void *RequestBuffer; /* request buffer */ |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 130 | } __attribute__((packed)) gdth_cmd_str; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 131 | |
| 132 | /* controller event structure */ |
| 133 | #define ES_ASYNC 1 |
| 134 | #define ES_DRIVER 2 |
| 135 | #define ES_TEST 3 |
| 136 | #define ES_SYNC 4 |
| 137 | typedef struct { |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 138 | u16 size; /* size of structure */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 139 | union { |
| 140 | char stream[16]; |
| 141 | struct { |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 142 | u16 ionode; |
| 143 | u16 service; |
| 144 | u32 index; |
| 145 | } __attribute__((packed)) driver; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 146 | struct { |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 147 | u16 ionode; |
| 148 | u16 service; |
| 149 | u16 status; |
| 150 | u32 info; |
| 151 | u8 scsi_coord[3]; |
| 152 | } __attribute__((packed)) async; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 153 | struct { |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 154 | u16 ionode; |
| 155 | u16 service; |
| 156 | u16 status; |
| 157 | u32 info; |
| 158 | u16 hostdrive; |
| 159 | u8 scsi_coord[3]; |
| 160 | u8 sense_key; |
| 161 | } __attribute__((packed)) sync; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 162 | struct { |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 163 | u32 l1, l2, l3, l4; |
| 164 | } __attribute__((packed)) test; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 165 | } eu; |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 166 | u32 severity; |
| 167 | u8 event_string[256]; |
| 168 | } __attribute__((packed)) gdth_evt_data; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 169 | |
| 170 | typedef struct { |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 171 | u32 first_stamp; |
| 172 | u32 last_stamp; |
| 173 | u16 same_count; |
| 174 | u16 event_source; |
| 175 | u16 event_idx; |
| 176 | u8 application; |
| 177 | u8 reserved; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 178 | gdth_evt_data event_data; |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 179 | } __attribute__((packed)) gdth_evt_str; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 180 | |
| 181 | |
| 182 | #ifdef GDTH_IOCTL_PROC |
| 183 | /* IOCTL structure (write) */ |
| 184 | typedef struct { |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 185 | u32 magic; /* IOCTL magic */ |
| 186 | u16 ioctl; /* IOCTL */ |
| 187 | u16 ionode; /* controller number */ |
| 188 | u16 service; /* controller service */ |
| 189 | u16 timeout; /* timeout */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 190 | union { |
| 191 | struct { |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 192 | u8 command[512]; /* controller command */ |
| 193 | u8 data[1]; /* add. data */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 194 | } general; |
| 195 | struct { |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 196 | u8 lock; /* lock/unlock */ |
| 197 | u8 drive_cnt; /* drive count */ |
| 198 | u16 drives[MAX_HDRIVES];/* drives */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 199 | } lockdrv; |
| 200 | struct { |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 201 | u8 lock; /* lock/unlock */ |
| 202 | u8 channel; /* channel */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 203 | } lockchn; |
| 204 | struct { |
| 205 | int erase; /* erase event ? */ |
| 206 | int handle; |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 207 | u8 evt[EVENT_SIZE]; /* event structure */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 208 | } event; |
| 209 | struct { |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 210 | u8 bus; /* SCSI bus */ |
| 211 | u8 target; /* target ID */ |
| 212 | u8 lun; /* LUN */ |
| 213 | u8 cmd_len; /* command length */ |
| 214 | u8 cmd[12]; /* SCSI command */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 215 | } scsi; |
| 216 | struct { |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 217 | u16 hdr_no; /* host drive number */ |
| 218 | u8 flag; /* old meth./add/remove */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 219 | } rescan; |
| 220 | } iu; |
| 221 | } gdth_iowr_str; |
| 222 | |
| 223 | /* IOCTL structure (read) */ |
| 224 | typedef struct { |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 225 | u32 size; /* buffer size */ |
| 226 | u32 status; /* IOCTL error code */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 227 | union { |
| 228 | struct { |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 229 | u8 data[1]; /* data */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 230 | } general; |
| 231 | struct { |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 232 | u16 version; /* driver version */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 233 | } drvers; |
| 234 | struct { |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 235 | u8 type; /* controller type */ |
| 236 | u16 info; /* slot etc. */ |
| 237 | u16 oem_id; /* OEM ID */ |
| 238 | u16 bios_ver; /* not used */ |
| 239 | u16 access; /* not used */ |
| 240 | u16 ext_type; /* extended type */ |
| 241 | u16 device_id; /* device ID */ |
| 242 | u16 sub_device_id; /* sub device ID */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 243 | } ctrtype; |
| 244 | struct { |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 245 | u8 version; /* OS version */ |
| 246 | u8 subversion; /* OS subversion */ |
| 247 | u16 revision; /* revision */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 248 | } osvers; |
| 249 | struct { |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 250 | u16 count; /* controller count */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 251 | } ctrcnt; |
| 252 | struct { |
| 253 | int handle; |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 254 | u8 evt[EVENT_SIZE]; /* event structure */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 255 | } event; |
| 256 | struct { |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 257 | u8 bus; /* SCSI bus, 0xff: invalid */ |
| 258 | u8 target; /* target ID */ |
| 259 | u8 lun; /* LUN */ |
| 260 | u8 cluster_type; /* cluster properties */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 261 | } hdr_list[MAX_HDRIVES]; /* index is host drive number */ |
| 262 | } iu; |
| 263 | } gdth_iord_str; |
| 264 | #endif |
| 265 | |
| 266 | /* GDTIOCTL_GENERAL */ |
| 267 | typedef struct { |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 268 | u16 ionode; /* controller number */ |
| 269 | u16 timeout; /* timeout */ |
| 270 | u32 info; /* error info */ |
| 271 | u16 status; /* status */ |
| 272 | unsigned long data_len; /* data buffer size */ |
| 273 | unsigned long sense_len; /* sense buffer size */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 274 | gdth_cmd_str command; /* command */ |
| 275 | } gdth_ioctl_general; |
| 276 | |
| 277 | /* GDTIOCTL_LOCKDRV */ |
| 278 | typedef struct { |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 279 | u16 ionode; /* controller number */ |
| 280 | u8 lock; /* lock/unlock */ |
| 281 | u8 drive_cnt; /* drive count */ |
| 282 | u16 drives[MAX_HDRIVES]; /* drives */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 283 | } gdth_ioctl_lockdrv; |
| 284 | |
| 285 | /* GDTIOCTL_LOCKCHN */ |
| 286 | typedef struct { |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 287 | u16 ionode; /* controller number */ |
| 288 | u8 lock; /* lock/unlock */ |
| 289 | u8 channel; /* channel */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 290 | } gdth_ioctl_lockchn; |
| 291 | |
| 292 | /* GDTIOCTL_OSVERS */ |
| 293 | typedef struct { |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 294 | u8 version; /* OS version */ |
| 295 | u8 subversion; /* OS subversion */ |
| 296 | u16 revision; /* revision */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 297 | } gdth_ioctl_osvers; |
| 298 | |
| 299 | /* GDTIOCTL_CTRTYPE */ |
| 300 | typedef struct { |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 301 | u16 ionode; /* controller number */ |
| 302 | u8 type; /* controller type */ |
| 303 | u16 info; /* slot etc. */ |
| 304 | u16 oem_id; /* OEM ID */ |
| 305 | u16 bios_ver; /* not used */ |
| 306 | u16 access; /* not used */ |
| 307 | u16 ext_type; /* extended type */ |
| 308 | u16 device_id; /* device ID */ |
| 309 | u16 sub_device_id; /* sub device ID */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 310 | } gdth_ioctl_ctrtype; |
| 311 | |
| 312 | /* GDTIOCTL_EVENT */ |
| 313 | typedef struct { |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 314 | u16 ionode; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 315 | int erase; /* erase event? */ |
| 316 | int handle; /* event handle */ |
| 317 | gdth_evt_str event; |
| 318 | } gdth_ioctl_event; |
| 319 | |
| 320 | /* GDTIOCTL_RESCAN/GDTIOCTL_HDRLIST */ |
| 321 | typedef struct { |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 322 | u16 ionode; /* controller number */ |
| 323 | u8 flag; /* add/remove */ |
| 324 | u16 hdr_no; /* drive no. */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 325 | struct { |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 326 | u8 bus; /* SCSI bus */ |
| 327 | u8 target; /* target ID */ |
| 328 | u8 lun; /* LUN */ |
| 329 | u8 cluster_type; /* cluster properties */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 330 | } hdr_list[MAX_HDRIVES]; /* index is host drive number */ |
| 331 | } gdth_ioctl_rescan; |
| 332 | |
| 333 | /* GDTIOCTL_RESET_BUS/GDTIOCTL_RESET_DRV */ |
| 334 | typedef struct { |
Dave Jones | 1fe6dbf | 2010-01-04 10:19:34 -0500 | [diff] [blame] | 335 | u16 ionode; /* controller number */ |
| 336 | u16 number; /* bus/host drive number */ |
| 337 | u16 status; /* status */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 338 | } gdth_ioctl_reset; |
| 339 | |
| 340 | #endif |