chsc.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2. /*
  3. * ioctl interface for /dev/chsc
  4. *
  5. * Copyright IBM Corp. 2008, 2012
  6. * Author(s): Cornelia Huck <[email protected]>
  7. */
  8. #ifndef _ASM_CHSC_H
  9. #define _ASM_CHSC_H
  10. #include <linux/types.h>
  11. #include <linux/ioctl.h>
  12. #include <asm/chpid.h>
  13. #include <asm/schid.h>
  14. #define CHSC_SIZE 0x1000
  15. struct chsc_async_header {
  16. __u16 length;
  17. __u16 code;
  18. __u32 cmd_dependend;
  19. __u32 key : 4;
  20. __u32 : 28;
  21. struct subchannel_id sid;
  22. };
  23. struct chsc_async_area {
  24. struct chsc_async_header header;
  25. __u8 data[CHSC_SIZE - sizeof(struct chsc_async_header)];
  26. };
  27. struct chsc_header {
  28. __u16 length;
  29. __u16 code;
  30. };
  31. struct chsc_sync_area {
  32. struct chsc_header header;
  33. __u8 data[CHSC_SIZE - sizeof(struct chsc_header)];
  34. };
  35. struct chsc_response_struct {
  36. __u16 length;
  37. __u16 code;
  38. __u32 parms;
  39. __u8 data[CHSC_SIZE - 2 * sizeof(__u16) - sizeof(__u32)];
  40. };
  41. struct chsc_chp_cd {
  42. struct chp_id chpid;
  43. int m;
  44. int fmt;
  45. struct chsc_response_struct cpcb;
  46. };
  47. struct chsc_cu_cd {
  48. __u16 cun;
  49. __u8 cssid;
  50. int m;
  51. int fmt;
  52. struct chsc_response_struct cucb;
  53. };
  54. struct chsc_sch_cud {
  55. struct subchannel_id schid;
  56. int fmt;
  57. struct chsc_response_struct scub;
  58. };
  59. struct conf_id {
  60. int m;
  61. __u8 cssid;
  62. __u8 ssid;
  63. };
  64. struct chsc_conf_info {
  65. struct conf_id id;
  66. int fmt;
  67. struct chsc_response_struct scid;
  68. };
  69. struct ccl_parm_chpid {
  70. int m;
  71. struct chp_id chp;
  72. };
  73. struct ccl_parm_cssids {
  74. __u8 f_cssid;
  75. __u8 l_cssid;
  76. };
  77. struct chsc_comp_list {
  78. struct {
  79. enum {
  80. CCL_CU_ON_CHP = 1,
  81. CCL_CHP_TYPE_CAP = 2,
  82. CCL_CSS_IMG = 4,
  83. CCL_CSS_IMG_CONF_CHAR = 5,
  84. CCL_IOP_CHP = 6,
  85. } ctype;
  86. int fmt;
  87. struct ccl_parm_chpid chpid;
  88. struct ccl_parm_cssids cssids;
  89. } req;
  90. struct chsc_response_struct sccl;
  91. };
  92. struct chsc_dcal {
  93. struct {
  94. enum {
  95. DCAL_CSS_IID_PN = 4,
  96. } atype;
  97. __u32 list_parm[2];
  98. int fmt;
  99. } req;
  100. struct chsc_response_struct sdcal;
  101. };
  102. struct chsc_cpd_info {
  103. struct chp_id chpid;
  104. int m;
  105. int fmt;
  106. int rfmt;
  107. int c;
  108. struct chsc_response_struct chpdb;
  109. };
  110. #define CHSC_IOCTL_MAGIC 'c'
  111. #define CHSC_START _IOWR(CHSC_IOCTL_MAGIC, 0x81, struct chsc_async_area)
  112. #define CHSC_INFO_CHANNEL_PATH _IOWR(CHSC_IOCTL_MAGIC, 0x82, \
  113. struct chsc_chp_cd)
  114. #define CHSC_INFO_CU _IOWR(CHSC_IOCTL_MAGIC, 0x83, struct chsc_cu_cd)
  115. #define CHSC_INFO_SCH_CU _IOWR(CHSC_IOCTL_MAGIC, 0x84, struct chsc_sch_cud)
  116. #define CHSC_INFO_CI _IOWR(CHSC_IOCTL_MAGIC, 0x85, struct chsc_conf_info)
  117. #define CHSC_INFO_CCL _IOWR(CHSC_IOCTL_MAGIC, 0x86, struct chsc_comp_list)
  118. #define CHSC_INFO_CPD _IOWR(CHSC_IOCTL_MAGIC, 0x87, struct chsc_cpd_info)
  119. #define CHSC_INFO_DCAL _IOWR(CHSC_IOCTL_MAGIC, 0x88, struct chsc_dcal)
  120. #define CHSC_START_SYNC _IOWR(CHSC_IOCTL_MAGIC, 0x89, struct chsc_sync_area)
  121. #define CHSC_ON_CLOSE_SET _IOWR(CHSC_IOCTL_MAGIC, 0x8a, struct chsc_async_area)
  122. #define CHSC_ON_CLOSE_REMOVE _IO(CHSC_IOCTL_MAGIC, 0x8b)
  123. #endif