0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef _ASM_S390_CRW_H
0011 #define _ASM_S390_CRW_H
0012
0013 #include <linux/types.h>
0014
0015
0016
0017
0018 struct crw {
0019 __u32 res1 : 1;
0020 __u32 slct : 1;
0021 __u32 oflw : 1;
0022 __u32 chn : 1;
0023 __u32 rsc : 4;
0024 __u32 anc : 1;
0025 __u32 res2 : 1;
0026 __u32 erc : 6;
0027 __u32 rsid : 16;
0028 } __attribute__ ((packed));
0029
0030 typedef void (*crw_handler_t)(struct crw *, struct crw *, int);
0031
0032 extern int crw_register_handler(int rsc, crw_handler_t handler);
0033 extern void crw_unregister_handler(int rsc);
0034 extern void crw_handle_channel_report(void);
0035 void crw_wait_for_channel_report(void);
0036
0037 #define NR_RSCS 16
0038
0039 #define CRW_RSC_MONITOR 0x2
0040 #define CRW_RSC_SCH 0x3
0041 #define CRW_RSC_CPATH 0x4
0042 #define CRW_RSC_CONFIG 0x9
0043 #define CRW_RSC_CSS 0xB
0044
0045 #define CRW_ERC_EVENT 0x00
0046 #define CRW_ERC_AVAIL 0x01
0047 #define CRW_ERC_INIT 0x02
0048 #define CRW_ERC_TERROR 0x03
0049 #define CRW_ERC_IPARM 0x04
0050 #define CRW_ERC_TERM 0x05
0051 #define CRW_ERC_PERRN 0x06
0052 #define CRW_ERC_PERRI 0x07
0053 #define CRW_ERC_PMOD 0x08
0054
0055 #endif