1*6f52b16cSGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2607ca46eSDavid Howells #ifndef _UAPICCISS_IOCTLH 3607ca46eSDavid Howells #define _UAPICCISS_IOCTLH 4607ca46eSDavid Howells 5607ca46eSDavid Howells #include <linux/types.h> 6607ca46eSDavid Howells #include <linux/ioctl.h> 7607ca46eSDavid Howells #include <linux/cciss_defs.h> 8607ca46eSDavid Howells 9607ca46eSDavid Howells #define CCISS_IOC_MAGIC 'B' 10607ca46eSDavid Howells 11607ca46eSDavid Howells 12607ca46eSDavid Howells typedef struct _cciss_pci_info_struct 13607ca46eSDavid Howells { 14607ca46eSDavid Howells unsigned char bus; 15607ca46eSDavid Howells unsigned char dev_fn; 16607ca46eSDavid Howells unsigned short domain; 17607ca46eSDavid Howells __u32 board_id; 18607ca46eSDavid Howells } cciss_pci_info_struct; 19607ca46eSDavid Howells 20607ca46eSDavid Howells typedef struct _cciss_coalint_struct 21607ca46eSDavid Howells { 22607ca46eSDavid Howells __u32 delay; 23607ca46eSDavid Howells __u32 count; 24607ca46eSDavid Howells } cciss_coalint_struct; 25607ca46eSDavid Howells 26607ca46eSDavid Howells typedef char NodeName_type[16]; 27607ca46eSDavid Howells 28607ca46eSDavid Howells typedef __u32 Heartbeat_type; 29607ca46eSDavid Howells 30607ca46eSDavid Howells #define CISS_PARSCSIU2 0x0001 31607ca46eSDavid Howells #define CISS_PARCSCIU3 0x0002 32607ca46eSDavid Howells #define CISS_FIBRE1G 0x0100 33607ca46eSDavid Howells #define CISS_FIBRE2G 0x0200 34607ca46eSDavid Howells typedef __u32 BusTypes_type; 35607ca46eSDavid Howells 36607ca46eSDavid Howells typedef char FirmwareVer_type[4]; 37607ca46eSDavid Howells typedef __u32 DriverVer_type; 38607ca46eSDavid Howells 39607ca46eSDavid Howells #define MAX_KMALLOC_SIZE 128000 40607ca46eSDavid Howells 41607ca46eSDavid Howells typedef struct _IOCTL_Command_struct { 42607ca46eSDavid Howells LUNAddr_struct LUN_info; 43607ca46eSDavid Howells RequestBlock_struct Request; 44607ca46eSDavid Howells ErrorInfo_struct error_info; 45607ca46eSDavid Howells WORD buf_size; /* size in bytes of the buf */ 46607ca46eSDavid Howells BYTE __user *buf; 47607ca46eSDavid Howells } IOCTL_Command_struct; 48607ca46eSDavid Howells 49607ca46eSDavid Howells typedef struct _BIG_IOCTL_Command_struct { 50607ca46eSDavid Howells LUNAddr_struct LUN_info; 51607ca46eSDavid Howells RequestBlock_struct Request; 52607ca46eSDavid Howells ErrorInfo_struct error_info; 53607ca46eSDavid Howells DWORD malloc_size; /* < MAX_KMALLOC_SIZE in cciss.c */ 54607ca46eSDavid Howells DWORD buf_size; /* size in bytes of the buf */ 55607ca46eSDavid Howells /* < malloc_size * MAXSGENTRIES */ 56607ca46eSDavid Howells BYTE __user *buf; 57607ca46eSDavid Howells } BIG_IOCTL_Command_struct; 58607ca46eSDavid Howells 59607ca46eSDavid Howells typedef struct _LogvolInfo_struct{ 60607ca46eSDavid Howells __u32 LunID; 61607ca46eSDavid Howells int num_opens; /* number of opens on the logical volume */ 62607ca46eSDavid Howells int num_parts; /* number of partitions configured on logvol */ 63607ca46eSDavid Howells } LogvolInfo_struct; 64607ca46eSDavid Howells 65607ca46eSDavid Howells #define CCISS_GETPCIINFO _IOR(CCISS_IOC_MAGIC, 1, cciss_pci_info_struct) 66607ca46eSDavid Howells 67607ca46eSDavid Howells #define CCISS_GETINTINFO _IOR(CCISS_IOC_MAGIC, 2, cciss_coalint_struct) 68607ca46eSDavid Howells #define CCISS_SETINTINFO _IOW(CCISS_IOC_MAGIC, 3, cciss_coalint_struct) 69607ca46eSDavid Howells 70607ca46eSDavid Howells #define CCISS_GETNODENAME _IOR(CCISS_IOC_MAGIC, 4, NodeName_type) 71607ca46eSDavid Howells #define CCISS_SETNODENAME _IOW(CCISS_IOC_MAGIC, 5, NodeName_type) 72607ca46eSDavid Howells 73607ca46eSDavid Howells #define CCISS_GETHEARTBEAT _IOR(CCISS_IOC_MAGIC, 6, Heartbeat_type) 74607ca46eSDavid Howells #define CCISS_GETBUSTYPES _IOR(CCISS_IOC_MAGIC, 7, BusTypes_type) 75607ca46eSDavid Howells #define CCISS_GETFIRMVER _IOR(CCISS_IOC_MAGIC, 8, FirmwareVer_type) 76607ca46eSDavid Howells #define CCISS_GETDRIVVER _IOR(CCISS_IOC_MAGIC, 9, DriverVer_type) 77607ca46eSDavid Howells #define CCISS_REVALIDVOLS _IO(CCISS_IOC_MAGIC, 10) 78607ca46eSDavid Howells #define CCISS_PASSTHRU _IOWR(CCISS_IOC_MAGIC, 11, IOCTL_Command_struct) 79607ca46eSDavid Howells #define CCISS_DEREGDISK _IO(CCISS_IOC_MAGIC, 12) 80607ca46eSDavid Howells 81607ca46eSDavid Howells /* no longer used... use REGNEWD instead */ 82607ca46eSDavid Howells #define CCISS_REGNEWDISK _IOW(CCISS_IOC_MAGIC, 13, int) 83607ca46eSDavid Howells 84607ca46eSDavid Howells #define CCISS_REGNEWD _IO(CCISS_IOC_MAGIC, 14) 85607ca46eSDavid Howells #define CCISS_RESCANDISK _IO(CCISS_IOC_MAGIC, 16) 86607ca46eSDavid Howells #define CCISS_GETLUNINFO _IOR(CCISS_IOC_MAGIC, 17, LogvolInfo_struct) 87607ca46eSDavid Howells #define CCISS_BIG_PASSTHRU _IOWR(CCISS_IOC_MAGIC, 18, BIG_IOCTL_Command_struct) 88607ca46eSDavid Howells 89607ca46eSDavid Howells #endif /* _UAPICCISS_IOCTLH */ 90