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