2 * ioctl interface for /dev/chsc
4 * Copyright IBM Corp. 2008, 2012
5 * Author(s): Cornelia Huck <cornelia.huck@de.ibm.com>
11 #include <linux/types.h>
12 #include <linux/ioctl.h>
13 #include <asm/chpid.h>
14 #include <asm/schid.h>
16 #define CHSC_SIZE 0x1000
18 struct chsc_async_header
{
24 struct subchannel_id sid
;
25 } __attribute__ ((packed
));
27 struct chsc_async_area
{
28 struct chsc_async_header header
;
29 __u8 data
[CHSC_SIZE
- sizeof(struct chsc_async_header
)];
30 } __attribute__ ((packed
));
35 } __attribute__ ((packed
));
37 struct chsc_sync_area
{
38 struct chsc_header header
;
39 __u8 data
[CHSC_SIZE
- sizeof(struct chsc_header
)];
40 } __attribute__ ((packed
));
42 struct chsc_response_struct
{
46 __u8 data
[CHSC_SIZE
- 2 * sizeof(__u16
) - sizeof(__u32
)];
47 } __attribute__ ((packed
));
53 struct chsc_response_struct cpcb
;
61 struct chsc_response_struct cucb
;
65 struct subchannel_id schid
;
67 struct chsc_response_struct scub
;
76 struct chsc_conf_info
{
79 struct chsc_response_struct scid
;
82 struct ccl_parm_chpid
{
87 struct ccl_parm_cssids
{
92 struct chsc_comp_list
{
98 CCL_CSS_IMG_CONF_CHAR
= 5,
102 struct ccl_parm_chpid chpid
;
103 struct ccl_parm_cssids cssids
;
105 struct chsc_response_struct sccl
;
116 struct chsc_response_struct sdcal
;
119 struct chsc_cpd_info
{
125 struct chsc_response_struct chpdb
;
128 #define CHSC_IOCTL_MAGIC 'c'
130 #define CHSC_START _IOWR(CHSC_IOCTL_MAGIC, 0x81, struct chsc_async_area)
131 #define CHSC_INFO_CHANNEL_PATH _IOWR(CHSC_IOCTL_MAGIC, 0x82, \
133 #define CHSC_INFO_CU _IOWR(CHSC_IOCTL_MAGIC, 0x83, struct chsc_cu_cd)
134 #define CHSC_INFO_SCH_CU _IOWR(CHSC_IOCTL_MAGIC, 0x84, struct chsc_sch_cud)
135 #define CHSC_INFO_CI _IOWR(CHSC_IOCTL_MAGIC, 0x85, struct chsc_conf_info)
136 #define CHSC_INFO_CCL _IOWR(CHSC_IOCTL_MAGIC, 0x86, struct chsc_comp_list)
137 #define CHSC_INFO_CPD _IOWR(CHSC_IOCTL_MAGIC, 0x87, struct chsc_cpd_info)
138 #define CHSC_INFO_DCAL _IOWR(CHSC_IOCTL_MAGIC, 0x88, struct chsc_dcal)
139 #define CHSC_START_SYNC _IOWR(CHSC_IOCTL_MAGIC, 0x89, struct chsc_sync_area)
140 #define CHSC_ON_CLOSE_SET _IOWR(CHSC_IOCTL_MAGIC, 0x8a, struct chsc_async_area)
141 #define CHSC_ON_CLOSE_REMOVE _IO(CHSC_IOCTL_MAGIC, 0x8b)