/* SPDX-License-Identifier: GPL-2.0 */1/*2* Data definitions for channel report processing3* Copyright IBM Corp. 2000, 20094* Author(s): Ingo Adlung <[email protected]>,5* Martin Schwidefsky <[email protected]>,6* Cornelia Huck <[email protected]>,7*/89#ifndef _ASM_S390_CRW_H10#define _ASM_S390_CRW_H1112#include <linux/types.h>1314/*15* Channel Report Word16*/17struct crw {18__u32 res1 : 1; /* reserved zero */19__u32 slct : 1; /* solicited */20__u32 oflw : 1; /* overflow */21__u32 chn : 1; /* chained */22__u32 rsc : 4; /* reporting source code */23__u32 anc : 1; /* ancillary report */24__u32 res2 : 1; /* reserved zero */25__u32 erc : 6; /* error-recovery code */26__u32 rsid : 16; /* reporting-source ID */27} __attribute__ ((packed));2829typedef void (*crw_handler_t)(struct crw *, struct crw *, int);3031extern int crw_register_handler(int rsc, crw_handler_t handler);32extern void crw_unregister_handler(int rsc);33extern void crw_handle_channel_report(void);34void crw_wait_for_channel_report(void);3536#define NR_RSCS 163738#define CRW_RSC_MONITOR 0x2 /* monitoring facility */39#define CRW_RSC_SCH 0x3 /* subchannel */40#define CRW_RSC_CPATH 0x4 /* channel path */41#define CRW_RSC_CONFIG 0x9 /* configuration-alert facility */42#define CRW_RSC_CSS 0xB /* channel subsystem */4344#define CRW_ERC_EVENT 0x00 /* event information pending */45#define CRW_ERC_AVAIL 0x01 /* available */46#define CRW_ERC_INIT 0x02 /* initialized */47#define CRW_ERC_TERROR 0x03 /* temporary error */48#define CRW_ERC_IPARM 0x04 /* installed parm initialized */49#define CRW_ERC_TERM 0x05 /* terminal */50#define CRW_ERC_PERRN 0x06 /* perm. error, fac. not init */51#define CRW_ERC_PERRI 0x07 /* perm. error, facility init */52#define CRW_ERC_PMOD 0x08 /* installed parameters modified */5354#endif /* _ASM_S390_CRW_H */555657