chsc.h 2.5 KB

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