cciss_ioctl.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2. #ifndef _UAPICCISS_IOCTLH
  3. #define _UAPICCISS_IOCTLH
  4. #include <linux/types.h>
  5. #include <linux/ioctl.h>
  6. #include <linux/cciss_defs.h>
  7. #define CCISS_IOC_MAGIC 'B'
  8. typedef struct _cciss_pci_info_struct
  9. {
  10. unsigned char bus;
  11. unsigned char dev_fn;
  12. unsigned short domain;
  13. __u32 board_id;
  14. } cciss_pci_info_struct;
  15. typedef struct _cciss_coalint_struct
  16. {
  17. __u32 delay;
  18. __u32 count;
  19. } cciss_coalint_struct;
  20. typedef char NodeName_type[16];
  21. typedef __u32 Heartbeat_type;
  22. #define CISS_PARSCSIU2 0x0001
  23. #define CISS_PARCSCIU3 0x0002
  24. #define CISS_FIBRE1G 0x0100
  25. #define CISS_FIBRE2G 0x0200
  26. typedef __u32 BusTypes_type;
  27. typedef char FirmwareVer_type[4];
  28. typedef __u32 DriverVer_type;
  29. #define MAX_KMALLOC_SIZE 128000
  30. typedef struct _IOCTL_Command_struct {
  31. LUNAddr_struct LUN_info;
  32. RequestBlock_struct Request;
  33. ErrorInfo_struct error_info;
  34. WORD buf_size; /* size in bytes of the buf */
  35. BYTE __user *buf;
  36. } IOCTL_Command_struct;
  37. typedef struct _BIG_IOCTL_Command_struct {
  38. LUNAddr_struct LUN_info;
  39. RequestBlock_struct Request;
  40. ErrorInfo_struct error_info;
  41. DWORD malloc_size; /* < MAX_KMALLOC_SIZE in cciss.c */
  42. DWORD buf_size; /* size in bytes of the buf */
  43. /* < malloc_size * MAXSGENTRIES */
  44. BYTE __user *buf;
  45. } BIG_IOCTL_Command_struct;
  46. typedef struct _LogvolInfo_struct{
  47. __u32 LunID;
  48. int num_opens; /* number of opens on the logical volume */
  49. int num_parts; /* number of partitions configured on logvol */
  50. } LogvolInfo_struct;
  51. #define CCISS_GETPCIINFO _IOR(CCISS_IOC_MAGIC, 1, cciss_pci_info_struct)
  52. #define CCISS_GETINTINFO _IOR(CCISS_IOC_MAGIC, 2, cciss_coalint_struct)
  53. #define CCISS_SETINTINFO _IOW(CCISS_IOC_MAGIC, 3, cciss_coalint_struct)
  54. #define CCISS_GETNODENAME _IOR(CCISS_IOC_MAGIC, 4, NodeName_type)
  55. #define CCISS_SETNODENAME _IOW(CCISS_IOC_MAGIC, 5, NodeName_type)
  56. #define CCISS_GETHEARTBEAT _IOR(CCISS_IOC_MAGIC, 6, Heartbeat_type)
  57. #define CCISS_GETBUSTYPES _IOR(CCISS_IOC_MAGIC, 7, BusTypes_type)
  58. #define CCISS_GETFIRMVER _IOR(CCISS_IOC_MAGIC, 8, FirmwareVer_type)
  59. #define CCISS_GETDRIVVER _IOR(CCISS_IOC_MAGIC, 9, DriverVer_type)
  60. #define CCISS_REVALIDVOLS _IO(CCISS_IOC_MAGIC, 10)
  61. #define CCISS_PASSTHRU _IOWR(CCISS_IOC_MAGIC, 11, IOCTL_Command_struct)
  62. #define CCISS_DEREGDISK _IO(CCISS_IOC_MAGIC, 12)
  63. /* no longer used... use REGNEWD instead */
  64. #define CCISS_REGNEWDISK _IOW(CCISS_IOC_MAGIC, 13, int)
  65. #define CCISS_REGNEWD _IO(CCISS_IOC_MAGIC, 14)
  66. #define CCISS_RESCANDISK _IO(CCISS_IOC_MAGIC, 16)
  67. #define CCISS_GETLUNINFO _IOR(CCISS_IOC_MAGIC, 17, LogvolInfo_struct)
  68. #define CCISS_BIG_PASSTHRU _IOWR(CCISS_IOC_MAGIC, 18, BIG_IOCTL_Command_struct)
  69. #endif /* _UAPICCISS_IOCTLH */