^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) #ifndef _GDTH_IOCTL_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) #define _GDTH_IOCTL_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) /* gdth_ioctl.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) * $Id: gdth_ioctl.h,v 1.14 2004/02/19 15:43:15 achim Exp $
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) /* IOCTLs */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #define GDTIOCTL_MASK ('J'<<8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #define GDTIOCTL_GENERAL (GDTIOCTL_MASK | 0) /* general IOCTL */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #define GDTIOCTL_DRVERS (GDTIOCTL_MASK | 1) /* get driver version */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) #define GDTIOCTL_CTRTYPE (GDTIOCTL_MASK | 2) /* get controller type */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) #define GDTIOCTL_OSVERS (GDTIOCTL_MASK | 3) /* get OS version */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) #define GDTIOCTL_HDRLIST (GDTIOCTL_MASK | 4) /* get host drive list */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) #define GDTIOCTL_CTRCNT (GDTIOCTL_MASK | 5) /* get controller count */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) #define GDTIOCTL_LOCKDRV (GDTIOCTL_MASK | 6) /* lock host drive */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) #define GDTIOCTL_LOCKCHN (GDTIOCTL_MASK | 7) /* lock channel */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) #define GDTIOCTL_EVENT (GDTIOCTL_MASK | 8) /* read controller events */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) #define GDTIOCTL_SCSI (GDTIOCTL_MASK | 9) /* SCSI command */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) #define GDTIOCTL_RESET_BUS (GDTIOCTL_MASK |10) /* reset SCSI bus */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) #define GDTIOCTL_RESCAN (GDTIOCTL_MASK |11) /* rescan host drives */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) #define GDTIOCTL_RESET_DRV (GDTIOCTL_MASK |12) /* reset (remote) drv. res. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) #define GDTIOCTL_MAGIC 0xaffe0004
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) #define EVENT_SIZE 294
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) #define GDTH_MAXSG 32 /* max. s/g elements */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) #define MAX_LDRIVES 255 /* max. log. drive count */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) #define MAX_HDRIVES MAX_LDRIVES /* max. host drive count */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) /* scatter/gather element */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) typedef struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) u32 sg_ptr; /* address */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) u32 sg_len; /* length */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) } __attribute__((packed)) gdth_sg_str;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) /* scatter/gather element - 64bit addresses */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) typedef struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) u64 sg_ptr; /* address */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) u32 sg_len; /* length */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) } __attribute__((packed)) gdth_sg64_str;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) /* command structure */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) typedef struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) u32 BoardNode; /* board node (always 0) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) u32 CommandIndex; /* command number */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) u16 OpCode; /* the command (READ,..) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) union {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) u16 DeviceNo; /* number of cache drive */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) u32 BlockNo; /* block number */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) u32 BlockCnt; /* block count */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) u32 DestAddr; /* dest. addr. (if s/g: -1) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) u32 sg_canz; /* s/g element count */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) gdth_sg_str sg_lst[GDTH_MAXSG]; /* s/g list */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) } __attribute__((packed)) cache; /* cache service cmd. str. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) u16 DeviceNo; /* number of cache drive */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) u64 BlockNo; /* block number */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) u32 BlockCnt; /* block count */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) u64 DestAddr; /* dest. addr. (if s/g: -1) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) u32 sg_canz; /* s/g element count */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) gdth_sg64_str sg_lst[GDTH_MAXSG]; /* s/g list */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) } __attribute__((packed)) cache64; /* cache service cmd. str. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) u16 param_size; /* size of p_param buffer */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) u32 subfunc; /* IOCTL function */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) u32 channel; /* device */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) u64 p_param; /* buffer */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) } __attribute__((packed)) ioctl; /* IOCTL command structure */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) u16 reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) union {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) u32 msg_handle; /* message handle */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) u64 msg_addr; /* message buffer address */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) } __attribute__((packed)) msg;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) u8 data[12]; /* buffer for rtc data, ... */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) } su;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) } __attribute__((packed)) screen; /* screen service cmd. str. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) u16 reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) u32 direction; /* data direction */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) u32 mdisc_time; /* disc. time (0: no timeout)*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) u32 mcon_time; /* connect time(0: no to.) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) u32 sdata; /* dest. addr. (if s/g: -1) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) u32 sdlen; /* data length (bytes) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) u32 clen; /* SCSI cmd. length(6,10,12) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) u8 cmd[12]; /* SCSI command */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) u8 target; /* target ID */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) u8 lun; /* LUN */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) u8 bus; /* SCSI bus number */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) u8 priority; /* only 0 used */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) u32 sense_len; /* sense data length */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) u32 sense_data; /* sense data addr. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) u32 link_p; /* linked cmds (not supp.) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) u32 sg_ranz; /* s/g element count */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) gdth_sg_str sg_lst[GDTH_MAXSG]; /* s/g list */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) } __attribute__((packed)) raw; /* raw service cmd. struct. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) u16 reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) u32 direction; /* data direction */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) u32 mdisc_time; /* disc. time (0: no timeout)*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) u32 mcon_time; /* connect time(0: no to.) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) u64 sdata; /* dest. addr. (if s/g: -1) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) u32 sdlen; /* data length (bytes) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) u32 clen; /* SCSI cmd. length(6,..,16) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) u8 cmd[16]; /* SCSI command */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) u8 target; /* target ID */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) u8 lun; /* LUN */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) u8 bus; /* SCSI bus number */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) u8 priority; /* only 0 used */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) u32 sense_len; /* sense data length */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) u64 sense_data; /* sense data addr. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) u32 sg_ranz; /* s/g element count */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) gdth_sg64_str sg_lst[GDTH_MAXSG]; /* s/g list */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) } __attribute__((packed)) raw64; /* raw service cmd. struct. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) } u;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) /* additional variables */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) u8 Service; /* controller service */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) u8 reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) u16 Status; /* command result */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) u32 Info; /* additional information */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) void *RequestBuffer; /* request buffer */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) } __attribute__((packed)) gdth_cmd_str;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) /* controller event structure */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) #define ES_ASYNC 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) #define ES_DRIVER 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) #define ES_TEST 3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) #define ES_SYNC 4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) typedef struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) u16 size; /* size of structure */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) union {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) char stream[16];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) u16 ionode;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) u16 service;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) u32 index;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) } __attribute__((packed)) driver;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) u16 ionode;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) u16 service;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) u16 status;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) u32 info;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) u8 scsi_coord[3];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) } __attribute__((packed)) async;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) u16 ionode;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) u16 service;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) u16 status;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) u32 info;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) u16 hostdrive;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) u8 scsi_coord[3];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) u8 sense_key;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) } __attribute__((packed)) sync;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) u32 l1, l2, l3, l4;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) } __attribute__((packed)) test;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) } eu;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) u32 severity;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) u8 event_string[256];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) } __attribute__((packed)) gdth_evt_data;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) typedef struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) u32 first_stamp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) u32 last_stamp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) u16 same_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) u16 event_source;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) u16 event_idx;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) u8 application;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) u8 reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) gdth_evt_data event_data;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) } __attribute__((packed)) gdth_evt_str;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) /* GDTIOCTL_GENERAL */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) typedef struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) u16 ionode; /* controller number */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) u16 timeout; /* timeout */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) u32 info; /* error info */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) u16 status; /* status */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) unsigned long data_len; /* data buffer size */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) unsigned long sense_len; /* sense buffer size */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) gdth_cmd_str command; /* command */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) } gdth_ioctl_general;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) /* GDTIOCTL_LOCKDRV */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) typedef struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) u16 ionode; /* controller number */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) u8 lock; /* lock/unlock */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) u8 drive_cnt; /* drive count */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) u16 drives[MAX_HDRIVES]; /* drives */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) } gdth_ioctl_lockdrv;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) /* GDTIOCTL_LOCKCHN */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) typedef struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) u16 ionode; /* controller number */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) u8 lock; /* lock/unlock */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) u8 channel; /* channel */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) } gdth_ioctl_lockchn;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) /* GDTIOCTL_OSVERS */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) typedef struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) u8 version; /* OS version */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) u8 subversion; /* OS subversion */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) u16 revision; /* revision */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) } gdth_ioctl_osvers;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) /* GDTIOCTL_CTRTYPE */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) typedef struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) u16 ionode; /* controller number */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) u8 type; /* controller type */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) u16 info; /* slot etc. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) u16 oem_id; /* OEM ID */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) u16 bios_ver; /* not used */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) u16 access; /* not used */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) u16 ext_type; /* extended type */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) u16 device_id; /* device ID */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) u16 sub_device_id; /* sub device ID */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) } gdth_ioctl_ctrtype;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) /* GDTIOCTL_EVENT */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) typedef struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) u16 ionode;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) int erase; /* erase event? */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) int handle; /* event handle */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) gdth_evt_str event;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) } gdth_ioctl_event;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) /* GDTIOCTL_RESCAN/GDTIOCTL_HDRLIST */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) typedef struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) u16 ionode; /* controller number */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) u8 flag; /* add/remove */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) u16 hdr_no; /* drive no. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) u8 bus; /* SCSI bus */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) u8 target; /* target ID */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) u8 lun; /* LUN */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) u8 cluster_type; /* cluster properties */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) } hdr_list[MAX_HDRIVES]; /* index is host drive number */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) } gdth_ioctl_rescan;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) /* GDTIOCTL_RESET_BUS/GDTIOCTL_RESET_DRV */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) typedef struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) u16 ionode; /* controller number */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) u16 number; /* bus/host drive number */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) u16 status; /* status */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) } gdth_ioctl_reset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) #endif