cciss_ioctl.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. #ifndef CCISS_IOCTLH
  2. #define CCISS_IOCTLH
  3. #include <linux/types.h>
  4. #include <linux/ioctl.h>
  5. #include <linux/cciss_defs.h>
  6. #define CCISS_IOC_MAGIC 'B'
  7. typedef struct _cciss_pci_info_struct
  8. {
  9. unsigned char bus;
  10. unsigned char dev_fn;
  11. unsigned short domain;
  12. __u32 board_id;
  13. } cciss_pci_info_struct;
  14. typedef struct _cciss_coalint_struct
  15. {
  16. __u32 delay;
  17. __u32 count;
  18. } cciss_coalint_struct;
  19. typedef char NodeName_type[16];
  20. typedef __u32 Heartbeat_type;
  21. #define CISS_PARSCSIU2 0x0001
  22. #define CISS_PARCSCIU3 0x0002
  23. #define CISS_FIBRE1G 0x0100
  24. #define CISS_FIBRE2G 0x0200
  25. typedef __u32 BusTypes_type;
  26. typedef char FirmwareVer_type[4];
  27. typedef __u32 DriverVer_type;
  28. #define MAX_KMALLOC_SIZE 128000
  29. typedef struct _IOCTL_Command_struct {
  30. LUNAddr_struct LUN_info;
  31. RequestBlock_struct Request;
  32. ErrorInfo_struct error_info;
  33. WORD buf_size; /* size in bytes of the buf */
  34. BYTE __user *buf;
  35. } IOCTL_Command_struct;
  36. typedef struct _BIG_IOCTL_Command_struct {
  37. LUNAddr_struct LUN_info;
  38. RequestBlock_struct Request;
  39. ErrorInfo_struct error_info;
  40. DWORD malloc_size; /* < MAX_KMALLOC_SIZE in cciss.c */
  41. DWORD buf_size; /* size in bytes of the buf */
  42. /* < malloc_size * MAXSGENTRIES */
  43. BYTE __user *buf;
  44. } BIG_IOCTL_Command_struct;
  45. typedef struct _LogvolInfo_struct{
  46. __u32 LunID;
  47. int num_opens; /* number of opens on the logical volume */
  48. int num_parts; /* number of partitions configured on logvol */
  49. } LogvolInfo_struct;
  50. #define CCISS_GETPCIINFO _IOR(CCISS_IOC_MAGIC, 1, cciss_pci_info_struct)
  51. #define CCISS_GETINTINFO _IOR(CCISS_IOC_MAGIC, 2, cciss_coalint_struct)
  52. #define CCISS_SETINTINFO _IOW(CCISS_IOC_MAGIC, 3, cciss_coalint_struct)
  53. #define CCISS_GETNODENAME _IOR(CCISS_IOC_MAGIC, 4, NodeName_type)
  54. #define CCISS_SETNODENAME _IOW(CCISS_IOC_MAGIC, 5, NodeName_type)
  55. #define CCISS_GETHEARTBEAT _IOR(CCISS_IOC_MAGIC, 6, Heartbeat_type)
  56. #define CCISS_GETBUSTYPES _IOR(CCISS_IOC_MAGIC, 7, BusTypes_type)
  57. #define CCISS_GETFIRMVER _IOR(CCISS_IOC_MAGIC, 8, FirmwareVer_type)
  58. #define CCISS_GETDRIVVER _IOR(CCISS_IOC_MAGIC, 9, DriverVer_type)
  59. #define CCISS_REVALIDVOLS _IO(CCISS_IOC_MAGIC, 10)
  60. #define CCISS_PASSTHRU _IOWR(CCISS_IOC_MAGIC, 11, IOCTL_Command_struct)
  61. #define CCISS_DEREGDISK _IO(CCISS_IOC_MAGIC, 12)
  62. /* no longer used... use REGNEWD instead */
  63. #define CCISS_REGNEWDISK _IOW(CCISS_IOC_MAGIC, 13, int)
  64. #define CCISS_REGNEWD _IO(CCISS_IOC_MAGIC, 14)
  65. #define CCISS_RESCANDISK _IO(CCISS_IOC_MAGIC, 16)
  66. #define CCISS_GETLUNINFO _IOR(CCISS_IOC_MAGIC, 17, LogvolInfo_struct)
  67. #define CCISS_BIG_PASSTHRU _IOWR(CCISS_IOC_MAGIC, 18, BIG_IOCTL_Command_struct)
  68. #ifdef __KERNEL__
  69. #ifdef CONFIG_COMPAT
  70. /* 32 bit compatible ioctl structs */
  71. typedef struct _IOCTL32_Command_struct {
  72. LUNAddr_struct LUN_info;
  73. RequestBlock_struct Request;
  74. ErrorInfo_struct error_info;
  75. WORD buf_size; /* size in bytes of the buf */
  76. __u32 buf; /* 32 bit pointer to data buffer */
  77. } IOCTL32_Command_struct;
  78. typedef struct _BIG_IOCTL32_Command_struct {
  79. LUNAddr_struct LUN_info;
  80. RequestBlock_struct Request;
  81. ErrorInfo_struct error_info;
  82. DWORD malloc_size; /* < MAX_KMALLOC_SIZE in cciss.c */
  83. DWORD buf_size; /* size in bytes of the buf */
  84. /* < malloc_size * MAXSGENTRIES */
  85. __u32 buf; /* 32 bit pointer to data buffer */
  86. } BIG_IOCTL32_Command_struct;
  87. #define CCISS_PASSTHRU32 _IOWR(CCISS_IOC_MAGIC, 11, IOCTL32_Command_struct)
  88. #define CCISS_BIG_PASSTHRU32 _IOWR(CCISS_IOC_MAGIC, 18, BIG_IOCTL32_Command_struct)
  89. #endif /* CONFIG_COMPAT */
  90. #endif /* __KERNEL__ */
  91. #endif