1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
3 * ioctl interface for /dev/chsc
5 * Copyright IBM Corp. 2008, 2012
6 * Author(s): Cornelia Huck <cornelia.huck@de.ibm.com>
12 #include <linux/types.h>
13 #include <linux/ioctl.h>
14 #include <asm/chpid.h>
15 #include <asm/schid.h>
17 #define CHSC_SIZE 0x1000
19 struct chsc_async_header
{
25 struct subchannel_id sid
;
28 struct chsc_async_area
{
29 struct chsc_async_header header
;
30 __u8 data
[CHSC_SIZE
- sizeof(struct chsc_async_header
)];
38 struct chsc_sync_area
{
39 struct chsc_header header
;
40 __u8 data
[CHSC_SIZE
- sizeof(struct chsc_header
)];
43 struct chsc_response_struct
{
47 __u8 data
[CHSC_SIZE
- 2 * sizeof(__u16
) - sizeof(__u32
)];
54 struct chsc_response_struct cpcb
;
62 struct chsc_response_struct cucb
;
66 struct subchannel_id schid
;
68 struct chsc_response_struct scub
;
77 struct chsc_conf_info
{
80 struct chsc_response_struct scid
;
83 struct ccl_parm_chpid
{
88 struct ccl_parm_cssids
{
93 struct chsc_comp_list
{
99 CCL_CSS_IMG_CONF_CHAR
= 5,
103 struct ccl_parm_chpid chpid
;
104 struct ccl_parm_cssids cssids
;
106 struct chsc_response_struct sccl
;
117 struct chsc_response_struct sdcal
;
120 struct chsc_cpd_info
{
126 struct chsc_response_struct chpdb
;
129 #define CHSC_IOCTL_MAGIC 'c'
131 #define CHSC_START _IOWR(CHSC_IOCTL_MAGIC, 0x81, struct chsc_async_area)
132 #define CHSC_INFO_CHANNEL_PATH _IOWR(CHSC_IOCTL_MAGIC, 0x82, \
134 #define CHSC_INFO_CU _IOWR(CHSC_IOCTL_MAGIC, 0x83, struct chsc_cu_cd)
135 #define CHSC_INFO_SCH_CU _IOWR(CHSC_IOCTL_MAGIC, 0x84, struct chsc_sch_cud)
136 #define CHSC_INFO_CI _IOWR(CHSC_IOCTL_MAGIC, 0x85, struct chsc_conf_info)
137 #define CHSC_INFO_CCL _IOWR(CHSC_IOCTL_MAGIC, 0x86, struct chsc_comp_list)
138 #define CHSC_INFO_CPD _IOWR(CHSC_IOCTL_MAGIC, 0x87, struct chsc_cpd_info)
139 #define CHSC_INFO_DCAL _IOWR(CHSC_IOCTL_MAGIC, 0x88, struct chsc_dcal)
140 #define CHSC_START_SYNC _IOWR(CHSC_IOCTL_MAGIC, 0x89, struct chsc_sync_area)
141 #define CHSC_ON_CLOSE_SET _IOWR(CHSC_IOCTL_MAGIC, 0x8a, struct chsc_async_area)
142 #define CHSC_ON_CLOSE_REMOVE _IO(CHSC_IOCTL_MAGIC, 0x8b)