crw.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * Data definitions for channel report processing
  3. * Copyright IBM Corp. 2000, 2009
  4. * Author(s): Ingo Adlung <adlung@de.ibm.com>,
  5. * Martin Schwidefsky <schwidefsky@de.ibm.com>,
  6. * Cornelia Huck <cornelia.huck@de.ibm.com>,
  7. * Heiko Carstens <heiko.carstens@de.ibm.com>,
  8. */
  9. #ifndef _ASM_S390_CRW_H
  10. #define _ASM_S390_CRW_H
  11. #include <linux/types.h>
  12. /*
  13. * Channel Report Word
  14. */
  15. struct crw {
  16. __u32 res1 : 1; /* reserved zero */
  17. __u32 slct : 1; /* solicited */
  18. __u32 oflw : 1; /* overflow */
  19. __u32 chn : 1; /* chained */
  20. __u32 rsc : 4; /* reporting source code */
  21. __u32 anc : 1; /* ancillary report */
  22. __u32 res2 : 1; /* reserved zero */
  23. __u32 erc : 6; /* error-recovery code */
  24. __u32 rsid : 16; /* reporting-source ID */
  25. } __attribute__ ((packed));
  26. typedef void (*crw_handler_t)(struct crw *, struct crw *, int);
  27. extern int crw_register_handler(int rsc, crw_handler_t handler);
  28. extern void crw_unregister_handler(int rsc);
  29. extern void crw_handle_channel_report(void);
  30. void crw_wait_for_channel_report(void);
  31. #define NR_RSCS 16
  32. #define CRW_RSC_MONITOR 0x2 /* monitoring facility */
  33. #define CRW_RSC_SCH 0x3 /* subchannel */
  34. #define CRW_RSC_CPATH 0x4 /* channel path */
  35. #define CRW_RSC_CONFIG 0x9 /* configuration-alert facility */
  36. #define CRW_RSC_CSS 0xB /* channel subsystem */
  37. #define CRW_ERC_EVENT 0x00 /* event information pending */
  38. #define CRW_ERC_AVAIL 0x01 /* available */
  39. #define CRW_ERC_INIT 0x02 /* initialized */
  40. #define CRW_ERC_TERROR 0x03 /* temporary error */
  41. #define CRW_ERC_IPARM 0x04 /* installed parm initialized */
  42. #define CRW_ERC_TERM 0x05 /* terminal */
  43. #define CRW_ERC_PERRN 0x06 /* perm. error, fac. not init */
  44. #define CRW_ERC_PERRI 0x07 /* perm. error, facility init */
  45. #define CRW_ERC_PMOD 0x08 /* installed parameters modified */
  46. #endif /* _ASM_S390_CRW_H */