Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
0002 #ifndef _UAPICCISS_IOCTLH
0003 #define _UAPICCISS_IOCTLH
0004 
0005 #include <linux/types.h>
0006 #include <linux/ioctl.h>
0007 #include <linux/cciss_defs.h>
0008 
0009 #define CCISS_IOC_MAGIC 'B'
0010 
0011 
0012 typedef struct _cciss_pci_info_struct
0013 {
0014     unsigned char   bus;
0015     unsigned char   dev_fn;
0016     unsigned short  domain;
0017     __u32       board_id;
0018 } cciss_pci_info_struct; 
0019 
0020 typedef struct _cciss_coalint_struct
0021 {
0022     __u32  delay;
0023     __u32  count;
0024 } cciss_coalint_struct;
0025 
0026 typedef char NodeName_type[16];
0027 
0028 typedef __u32 Heartbeat_type;
0029 
0030 #define CISS_PARSCSIU2  0x0001
0031 #define CISS_PARCSCIU3  0x0002
0032 #define CISS_FIBRE1G    0x0100
0033 #define CISS_FIBRE2G    0x0200
0034 typedef __u32 BusTypes_type;
0035 
0036 typedef char FirmwareVer_type[4];
0037 typedef __u32 DriverVer_type;
0038 
0039 #define MAX_KMALLOC_SIZE 128000
0040 
0041 typedef struct _IOCTL_Command_struct {
0042   LUNAddr_struct       LUN_info;
0043   RequestBlock_struct      Request;
0044   ErrorInfo_struct         error_info; 
0045   WORD             buf_size;  /* size in bytes of the buf */
0046   BYTE             __user *buf;
0047 } IOCTL_Command_struct;
0048 
0049 typedef struct _BIG_IOCTL_Command_struct {
0050   LUNAddr_struct       LUN_info;
0051   RequestBlock_struct      Request;
0052   ErrorInfo_struct         error_info;
0053   DWORD            malloc_size; /* < MAX_KMALLOC_SIZE in cciss.c */
0054   DWORD            buf_size;    /* size in bytes of the buf */
0055                         /* < malloc_size * MAXSGENTRIES */
0056   BYTE             __user *buf;
0057 } BIG_IOCTL_Command_struct;
0058 
0059 typedef struct _LogvolInfo_struct{
0060     __u32   LunID;
0061     int num_opens;  /* number of opens on the logical volume */
0062     int num_parts;  /* number of partitions configured on logvol */
0063 } LogvolInfo_struct;
0064 
0065 #define CCISS_GETPCIINFO _IOR(CCISS_IOC_MAGIC, 1, cciss_pci_info_struct)
0066 
0067 #define CCISS_GETINTINFO _IOR(CCISS_IOC_MAGIC, 2, cciss_coalint_struct)
0068 #define CCISS_SETINTINFO _IOW(CCISS_IOC_MAGIC, 3, cciss_coalint_struct)
0069 
0070 #define CCISS_GETNODENAME _IOR(CCISS_IOC_MAGIC, 4, NodeName_type)
0071 #define CCISS_SETNODENAME _IOW(CCISS_IOC_MAGIC, 5, NodeName_type)
0072 
0073 #define CCISS_GETHEARTBEAT _IOR(CCISS_IOC_MAGIC, 6, Heartbeat_type)
0074 #define CCISS_GETBUSTYPES  _IOR(CCISS_IOC_MAGIC, 7, BusTypes_type)
0075 #define CCISS_GETFIRMVER   _IOR(CCISS_IOC_MAGIC, 8, FirmwareVer_type)
0076 #define CCISS_GETDRIVVER   _IOR(CCISS_IOC_MAGIC, 9, DriverVer_type)
0077 #define CCISS_REVALIDVOLS  _IO(CCISS_IOC_MAGIC, 10)
0078 #define CCISS_PASSTHRU     _IOWR(CCISS_IOC_MAGIC, 11, IOCTL_Command_struct)
0079 #define CCISS_DEREGDISK    _IO(CCISS_IOC_MAGIC, 12)
0080 
0081 /* no longer used... use REGNEWD instead */ 
0082 #define CCISS_REGNEWDISK  _IOW(CCISS_IOC_MAGIC, 13, int)
0083 
0084 #define CCISS_REGNEWD      _IO(CCISS_IOC_MAGIC, 14)
0085 #define CCISS_RESCANDISK   _IO(CCISS_IOC_MAGIC, 16)
0086 #define CCISS_GETLUNINFO   _IOR(CCISS_IOC_MAGIC, 17, LogvolInfo_struct)
0087 #define CCISS_BIG_PASSTHRU _IOWR(CCISS_IOC_MAGIC, 18, BIG_IOCTL_Command_struct)
0088 
0089 #endif /* _UAPICCISS_IOCTLH */