| .. | .. |
|---|
| 27 | 27 | #define GDTH_MAXSG 32 /* max. s/g elements */ |
|---|
| 28 | 28 | |
|---|
| 29 | 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 | 30 | #define MAX_HDRIVES MAX_LDRIVES /* max. host drive count */ |
|---|
| 34 | | -#endif |
|---|
| 35 | 31 | |
|---|
| 36 | 32 | /* scatter/gather element */ |
|---|
| 37 | 33 | typedef struct { |
|---|
| .. | .. |
|---|
| 177 | 173 | u8 reserved; |
|---|
| 178 | 174 | gdth_evt_data event_data; |
|---|
| 179 | 175 | } __attribute__((packed)) gdth_evt_str; |
|---|
| 180 | | - |
|---|
| 181 | | - |
|---|
| 182 | | -#ifdef GDTH_IOCTL_PROC |
|---|
| 183 | | -/* IOCTL structure (write) */ |
|---|
| 184 | | -typedef struct { |
|---|
| 185 | | - u32 magic; /* IOCTL magic */ |
|---|
| 186 | | - u16 ioctl; /* IOCTL */ |
|---|
| 187 | | - u16 ionode; /* controller number */ |
|---|
| 188 | | - u16 service; /* controller service */ |
|---|
| 189 | | - u16 timeout; /* timeout */ |
|---|
| 190 | | - union { |
|---|
| 191 | | - struct { |
|---|
| 192 | | - u8 command[512]; /* controller command */ |
|---|
| 193 | | - u8 data[1]; /* add. data */ |
|---|
| 194 | | - } general; |
|---|
| 195 | | - struct { |
|---|
| 196 | | - u8 lock; /* lock/unlock */ |
|---|
| 197 | | - u8 drive_cnt; /* drive count */ |
|---|
| 198 | | - u16 drives[MAX_HDRIVES];/* drives */ |
|---|
| 199 | | - } lockdrv; |
|---|
| 200 | | - struct { |
|---|
| 201 | | - u8 lock; /* lock/unlock */ |
|---|
| 202 | | - u8 channel; /* channel */ |
|---|
| 203 | | - } lockchn; |
|---|
| 204 | | - struct { |
|---|
| 205 | | - int erase; /* erase event ? */ |
|---|
| 206 | | - int handle; |
|---|
| 207 | | - u8 evt[EVENT_SIZE]; /* event structure */ |
|---|
| 208 | | - } event; |
|---|
| 209 | | - struct { |
|---|
| 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 */ |
|---|
| 215 | | - } scsi; |
|---|
| 216 | | - struct { |
|---|
| 217 | | - u16 hdr_no; /* host drive number */ |
|---|
| 218 | | - u8 flag; /* old meth./add/remove */ |
|---|
| 219 | | - } rescan; |
|---|
| 220 | | - } iu; |
|---|
| 221 | | -} gdth_iowr_str; |
|---|
| 222 | | - |
|---|
| 223 | | -/* IOCTL structure (read) */ |
|---|
| 224 | | -typedef struct { |
|---|
| 225 | | - u32 size; /* buffer size */ |
|---|
| 226 | | - u32 status; /* IOCTL error code */ |
|---|
| 227 | | - union { |
|---|
| 228 | | - struct { |
|---|
| 229 | | - u8 data[1]; /* data */ |
|---|
| 230 | | - } general; |
|---|
| 231 | | - struct { |
|---|
| 232 | | - u16 version; /* driver version */ |
|---|
| 233 | | - } drvers; |
|---|
| 234 | | - struct { |
|---|
| 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 */ |
|---|
| 243 | | - } ctrtype; |
|---|
| 244 | | - struct { |
|---|
| 245 | | - u8 version; /* OS version */ |
|---|
| 246 | | - u8 subversion; /* OS subversion */ |
|---|
| 247 | | - u16 revision; /* revision */ |
|---|
| 248 | | - } osvers; |
|---|
| 249 | | - struct { |
|---|
| 250 | | - u16 count; /* controller count */ |
|---|
| 251 | | - } ctrcnt; |
|---|
| 252 | | - struct { |
|---|
| 253 | | - int handle; |
|---|
| 254 | | - u8 evt[EVENT_SIZE]; /* event structure */ |
|---|
| 255 | | - } event; |
|---|
| 256 | | - struct { |
|---|
| 257 | | - u8 bus; /* SCSI bus, 0xff: invalid */ |
|---|
| 258 | | - u8 target; /* target ID */ |
|---|
| 259 | | - u8 lun; /* LUN */ |
|---|
| 260 | | - u8 cluster_type; /* cluster properties */ |
|---|
| 261 | | - } hdr_list[MAX_HDRIVES]; /* index is host drive number */ |
|---|
| 262 | | - } iu; |
|---|
| 263 | | -} gdth_iord_str; |
|---|
| 264 | | -#endif |
|---|
| 265 | 176 | |
|---|
| 266 | 177 | /* GDTIOCTL_GENERAL */ |
|---|
| 267 | 178 | typedef struct { |
|---|