Linux Audio

Check our new training course

Loading...
v6.2
 1/* SPDX-License-Identifier: GPL-2.0 */
 2/*
 3 * Copyright IBM Corp. 2020
 4 *
 5 * Author(s): Alexandra Winter <wintera@linux.ibm.com>
 6 *
 7 * Interface for Channel Subsystem Call
 8 */
 9#ifndef _ASM_S390_CHSC_H
10#define _ASM_S390_CHSC_H
11
12#include <uapi/asm/chsc.h>
 
13
14/**
15 * Operation codes for CHSC PNSO:
16 *    PNSO_OC_NET_BRIDGE_INFO - only addresses that are visible to a bridgeport
17 *    PNSO_OC_NET_ADDR_INFO   - all addresses
18 */
19#define PNSO_OC_NET_BRIDGE_INFO		0
20#define PNSO_OC_NET_ADDR_INFO		3
21/**
22 * struct chsc_pnso_naid_l2 - network address information descriptor
23 * @nit:  Network interface token
24 * @addr_lnid: network address and logical network id (VLAN ID)
25 */
26struct chsc_pnso_naid_l2 {
27	u64 nit;
28	struct { u8 mac[6]; u16 lnid; } addr_lnid;
29} __packed;
30
31struct chsc_pnso_resume_token {
32	u64 t1;
33	u64 t2;
34} __packed;
35
36struct chsc_pnso_naihdr {
37	struct chsc_pnso_resume_token resume_token;
38	u32:32;
39	u32 instance;
40	u32:24;
41	u8 naids;
42	u32 reserved[3];
43} __packed;
44
45struct chsc_pnso_area {
46	struct chsc_header request;
47	u8:2;
48	u8 m:1;
49	u8:5;
50	u8:2;
51	u8 ssid:2;
52	u8 fmt:4;
53	u16 sch;
54	u8:8;
55	u8 cssid;
56	u16:16;
57	u8 oc;
58	u32:24;
59	struct chsc_pnso_resume_token resume_token;
60	u32 n:1;
61	u32:31;
62	u32 reserved[3];
63	struct chsc_header response;
64	u32:32;
65	struct chsc_pnso_naihdr naihdr;
66	struct chsc_pnso_naid_l2 entries[];
67} __packed __aligned(PAGE_SIZE);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
69#endif /* _ASM_S390_CHSC_H */
 
v3.1
 
  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
  8#ifndef _ASM_CHSC_H
  9#define _ASM_CHSC_H
 10
 11#include <linux/types.h>
 12#include <asm/chpid.h>
 13#include <asm/schid.h>
 14
 15struct chsc_async_header {
 16	__u16 length;
 17	__u16 code;
 18	__u32 cmd_dependend;
 19	__u32 key : 4;
 20	__u32 : 28;
 21	struct subchannel_id sid;
 22} __attribute__ ((packed));
 23
 24struct chsc_async_area {
 25	struct chsc_async_header header;
 26	__u8 data[PAGE_SIZE - 16 /* size of chsc_async_header */];
 27} __attribute__ ((packed));
 28
 29
 30struct chsc_response_struct {
 31	__u16 length;
 32	__u16 code;
 33	__u32 parms;
 34	__u8 data[PAGE_SIZE - 8];
 35} __attribute__ ((packed));
 36
 37struct chsc_chp_cd {
 38	struct chp_id chpid;
 39	int m;
 40	int fmt;
 41	struct chsc_response_struct cpcb;
 42};
 43
 44struct chsc_cu_cd {
 45	__u16 cun;
 46	__u8 cssid;
 47	int m;
 48	int fmt;
 49	struct chsc_response_struct cucb;
 50};
 51
 52struct chsc_sch_cud {
 53	struct subchannel_id schid;
 54	int fmt;
 55	struct chsc_response_struct scub;
 56};
 57
 58struct conf_id {
 59	int m;
 60	__u8 cssid;
 61	__u8 ssid;
 62};
 63
 64struct chsc_conf_info {
 65	struct conf_id id;
 66	int fmt;
 67	struct chsc_response_struct scid;
 68};
 69
 70struct ccl_parm_chpid {
 71	int m;
 72	struct chp_id chp;
 73};
 74
 75struct ccl_parm_cssids {
 76	__u8 f_cssid;
 77	__u8 l_cssid;
 78};
 79
 80struct chsc_comp_list {
 81	struct {
 82		enum {
 83			CCL_CU_ON_CHP = 1,
 84			CCL_CHP_TYPE_CAP = 2,
 85			CCL_CSS_IMG = 4,
 86			CCL_CSS_IMG_CONF_CHAR = 5,
 87			CCL_IOP_CHP = 6,
 88		} ctype;
 89		int fmt;
 90		struct ccl_parm_chpid chpid;
 91		struct ccl_parm_cssids cssids;
 92	} req;
 93	struct chsc_response_struct sccl;
 94};
 95
 96struct chsc_dcal {
 97	struct {
 98		enum {
 99			DCAL_CSS_IID_PN = 4,
100		} atype;
101		__u32 list_parm[2];
102		int fmt;
103	} req;
104	struct chsc_response_struct sdcal;
105};
106
107struct chsc_cpd_info {
108	struct chp_id chpid;
109	int m;
110	int fmt;
111	int rfmt;
112	int c;
113	struct chsc_response_struct chpdb;
114};
115
116#define CHSC_IOCTL_MAGIC 'c'
117
118#define CHSC_START _IOWR(CHSC_IOCTL_MAGIC, 0x81, struct chsc_async_area)
119#define CHSC_INFO_CHANNEL_PATH _IOWR(CHSC_IOCTL_MAGIC, 0x82, \
120				    struct chsc_chp_cd)
121#define CHSC_INFO_CU _IOWR(CHSC_IOCTL_MAGIC, 0x83, struct chsc_cu_cd)
122#define CHSC_INFO_SCH_CU _IOWR(CHSC_IOCTL_MAGIC, 0x84, struct chsc_sch_cud)
123#define CHSC_INFO_CI _IOWR(CHSC_IOCTL_MAGIC, 0x85, struct chsc_conf_info)
124#define CHSC_INFO_CCL _IOWR(CHSC_IOCTL_MAGIC, 0x86, struct chsc_comp_list)
125#define CHSC_INFO_CPD _IOWR(CHSC_IOCTL_MAGIC, 0x87, struct chsc_cpd_info)
126#define CHSC_INFO_DCAL _IOWR(CHSC_IOCTL_MAGIC, 0x88, struct chsc_dcal)
127
128#ifdef __KERNEL__
129
130struct css_general_char {
131	u64 : 12;
132	u32 dynio : 1;	 /* bit 12 */
133	u32 : 28;
134	u32 aif : 1;	 /* bit 41 */
135	u32 : 3;
136	u32 mcss : 1;	 /* bit 45 */
137	u32 fcs : 1;	 /* bit 46 */
138	u32 : 1;
139	u32 ext_mb : 1;  /* bit 48 */
140	u32 : 7;
141	u32 aif_tdd : 1; /* bit 56 */
142	u32 : 1;
143	u32 qebsm : 1;	 /* bit 58 */
144	u32 : 8;
145	u32 aif_osa : 1; /* bit 67 */
146	u32 : 14;
147	u32 cib : 1;	 /* bit 82 */
148	u32 : 5;
149	u32 fcx : 1;	 /* bit 88 */
150	u32 : 7;
151}__attribute__((packed));
152
153extern struct css_general_char css_general_characteristics;
154
155#endif /* __KERNEL__ */
156#endif