chsc.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. /*
  2. * ioctl interface for /dev/chsc
  3. *
  4. * Copyright 2008 IBM Corp.
  5. * Author(s): Cornelia Huck <cornelia.huck@de.ibm.com>
  6. */
  7. #ifndef _ASM_CHSC_H
  8. #define _ASM_CHSC_H
  9. #include <linux/types.h>
  10. #include <asm/chpid.h>
  11. #include <asm/schid.h>
  12. struct chsc_async_header {
  13. __u16 length;
  14. __u16 code;
  15. __u32 cmd_dependend;
  16. __u32 key : 4;
  17. __u32 : 28;
  18. struct subchannel_id sid;
  19. } __attribute__ ((packed));
  20. struct chsc_async_area {
  21. struct chsc_async_header header;
  22. __u8 data[PAGE_SIZE - 16 /* size of chsc_async_header */];
  23. } __attribute__ ((packed));
  24. struct chsc_response_struct {
  25. __u16 length;
  26. __u16 code;
  27. __u32 parms;
  28. __u8 data[PAGE_SIZE - 8];
  29. } __attribute__ ((packed));
  30. struct chsc_chp_cd {
  31. struct chp_id chpid;
  32. int m;
  33. int fmt;
  34. struct chsc_response_struct cpcb;
  35. };
  36. struct chsc_cu_cd {
  37. __u16 cun;
  38. __u8 cssid;
  39. int m;
  40. int fmt;
  41. struct chsc_response_struct cucb;
  42. };
  43. struct chsc_sch_cud {
  44. struct subchannel_id schid;
  45. int fmt;
  46. struct chsc_response_struct scub;
  47. };
  48. struct conf_id {
  49. int m;
  50. __u8 cssid;
  51. __u8 ssid;
  52. };
  53. struct chsc_conf_info {
  54. struct conf_id id;
  55. int fmt;
  56. struct chsc_response_struct scid;
  57. };
  58. struct ccl_parm_chpid {
  59. int m;
  60. struct chp_id chp;
  61. };
  62. struct ccl_parm_cssids {
  63. __u8 f_cssid;
  64. __u8 l_cssid;
  65. };
  66. struct chsc_comp_list {
  67. struct {
  68. enum {
  69. CCL_CU_ON_CHP = 1,
  70. CCL_CHP_TYPE_CAP = 2,
  71. CCL_CSS_IMG = 4,
  72. CCL_CSS_IMG_CONF_CHAR = 5,
  73. CCL_IOP_CHP = 6,
  74. } ctype;
  75. int fmt;
  76. struct ccl_parm_chpid chpid;
  77. struct ccl_parm_cssids cssids;
  78. } req;
  79. struct chsc_response_struct sccl;
  80. };
  81. struct chsc_dcal {
  82. struct {
  83. enum {
  84. DCAL_CSS_IID_PN = 4,
  85. } atype;
  86. __u32 list_parm[2];
  87. int fmt;
  88. } req;
  89. struct chsc_response_struct sdcal;
  90. };
  91. struct chsc_cpd_info {
  92. struct chp_id chpid;
  93. int m;
  94. int fmt;
  95. int rfmt;
  96. int c;
  97. struct chsc_response_struct chpdb;
  98. };
  99. #define CHSC_IOCTL_MAGIC 'c'
  100. #define CHSC_START _IOWR(CHSC_IOCTL_MAGIC, 0x81, struct chsc_async_area)
  101. #define CHSC_INFO_CHANNEL_PATH _IOWR(CHSC_IOCTL_MAGIC, 0x82, \
  102. struct chsc_chp_cd)
  103. #define CHSC_INFO_CU _IOWR(CHSC_IOCTL_MAGIC, 0x83, struct chsc_cu_cd)
  104. #define CHSC_INFO_SCH_CU _IOWR(CHSC_IOCTL_MAGIC, 0x84, struct chsc_sch_cud)
  105. #define CHSC_INFO_CI _IOWR(CHSC_IOCTL_MAGIC, 0x85, struct chsc_conf_info)
  106. #define CHSC_INFO_CCL _IOWR(CHSC_IOCTL_MAGIC, 0x86, struct chsc_comp_list)
  107. #define CHSC_INFO_CPD _IOWR(CHSC_IOCTL_MAGIC, 0x87, struct chsc_cpd_info)
  108. #define CHSC_INFO_DCAL _IOWR(CHSC_IOCTL_MAGIC, 0x88, struct chsc_dcal)
  109. #ifdef __KERNEL__
  110. struct css_general_char {
  111. u64 : 12;
  112. u32 dynio : 1; /* bit 12 */
  113. u32 : 28;
  114. u32 aif : 1; /* bit 41 */
  115. u32 : 3;
  116. u32 mcss : 1; /* bit 45 */
  117. u32 fcs : 1; /* bit 46 */
  118. u32 : 1;
  119. u32 ext_mb : 1; /* bit 48 */
  120. u32 : 7;
  121. u32 aif_tdd : 1; /* bit 56 */
  122. u32 : 1;
  123. u32 qebsm : 1; /* bit 58 */
  124. u32 : 8;
  125. u32 aif_osa : 1; /* bit 67 */
  126. u32 : 14;
  127. u32 cib : 1; /* bit 82 */
  128. u32 : 5;
  129. u32 fcx : 1; /* bit 88 */
  130. u32 : 7;
  131. }__attribute__((packed));
  132. extern struct css_general_char css_general_characteristics;
  133. #endif /* __KERNEL__ */
  134. #endif