1
2
3
4
5
6
7
8
9
10
11 #ifndef _ASM_S390_CRW_H
12 #define _ASM_S390_CRW_H
13
14 #include <linux/types.h>
15
16
17
18
19 struct crw {
20 __u32 res1 : 1;
21 __u32 slct : 1;
22 __u32 oflw : 1;
23 __u32 chn : 1;
24 __u32 rsc : 4;
25 __u32 anc : 1;
26 __u32 res2 : 1;
27 __u32 erc : 6;
28 __u32 rsid : 16;
29 } __attribute__ ((packed));
30
31 typedef void (*crw_handler_t)(struct crw *, struct crw *, int);
32
33 extern int crw_register_handler(int rsc, crw_handler_t handler);
34 extern void crw_unregister_handler(int rsc);
35 extern void crw_handle_channel_report(void);
36 void crw_wait_for_channel_report(void);
37
38 #define NR_RSCS 16
39
40 #define CRW_RSC_MONITOR 0x2
41 #define CRW_RSC_SCH 0x3
42 #define CRW_RSC_CPATH 0x4
43 #define CRW_RSC_CONFIG 0x9
44 #define CRW_RSC_CSS 0xB
45
46 #define CRW_ERC_EVENT 0x00
47 #define CRW_ERC_AVAIL 0x01
48 #define CRW_ERC_INIT 0x02
49 #define CRW_ERC_TERROR 0x03
50 #define CRW_ERC_IPARM 0x04
51 #define CRW_ERC_TERM 0x05
52 #define CRW_ERC_PERRN 0x06
53 #define CRW_ERC_PERRI 0x07
54 #define CRW_ERC_PMOD 0x08
55
56 #endif