chsc.h 2.4 KB

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