Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  *   Data definitions for channel report processing
0004  *    Copyright IBM Corp. 2000, 2009
0005  *    Author(s): Ingo Adlung <adlung@de.ibm.com>,
0006  *       Martin Schwidefsky <schwidefsky@de.ibm.com>,
0007  *       Cornelia Huck <cornelia.huck@de.ibm.com>,
0008  */
0009 
0010 #ifndef _ASM_S390_CRW_H
0011 #define _ASM_S390_CRW_H
0012 
0013 #include <linux/types.h>
0014 
0015 /*
0016  * Channel Report Word
0017  */
0018 struct crw {
0019     __u32 res1 :  1;   /* reserved zero */
0020     __u32 slct :  1;   /* solicited */
0021     __u32 oflw :  1;   /* overflow */
0022     __u32 chn  :  1;   /* chained */
0023     __u32 rsc  :  4;   /* reporting source code */
0024     __u32 anc  :  1;   /* ancillary report */
0025     __u32 res2 :  1;   /* reserved zero */
0026     __u32 erc  :  6;   /* error-recovery code */
0027     __u32 rsid : 16;   /* reporting-source ID */
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  /* monitoring facility */
0040 #define CRW_RSC_SCH  0x3  /* subchannel */
0041 #define CRW_RSC_CPATH    0x4  /* channel path */
0042 #define CRW_RSC_CONFIG   0x9  /* configuration-alert facility */
0043 #define CRW_RSC_CSS  0xB  /* channel subsystem */
0044 
0045 #define CRW_ERC_EVENT    0x00 /* event information pending */
0046 #define CRW_ERC_AVAIL    0x01 /* available */
0047 #define CRW_ERC_INIT     0x02 /* initialized */
0048 #define CRW_ERC_TERROR   0x03 /* temporary error */
0049 #define CRW_ERC_IPARM    0x04 /* installed parm initialized */
0050 #define CRW_ERC_TERM     0x05 /* terminal */
0051 #define CRW_ERC_PERRN    0x06 /* perm. error, fac. not init */
0052 #define CRW_ERC_PERRI    0x07 /* perm. error, facility init */
0053 #define CRW_ERC_PMOD     0x08 /* installed parameters modified */
0054 
0055 #endif /* _ASM_S390_CRW_H */