1 /* CHSC.H (c) Copyright Jan Jaeger, 1999-2000 */ 2 /* Channel Subsystem interface fields */ 3 4 #if !defined(_CHSC_H) 5 6 #define _CHSC_H 7 8 // #if defined(FEATURE_CHSC) 9 typedef struct _CHSC_REQ { 10 HWORD length; /* Offset to response field */ 11 HWORD req; /* Request code */ 12 FWORD resv[3]; 13 } CHSC_REQ; 14 15 typedef struct _CHSC_REQ4 { 16 HWORD length; /* Offset to response field */ 17 HWORD req; /* Request code */ 18 #define CHSC_REQ_SCHDESC 0x04 19 #define CHSC_REQ_CSSINFO 0x10 20 HWORD resv1; 21 HWORD f_sch; /* First subchannel */ 22 HWORD resv2; 23 HWORD l_sch; /* Last subchannel */ 24 FWORD resv3; 25 } CHSC_REQ4; 26 27 typedef struct _CHSC_RSP { 28 HWORD length; /* Length of response field */ 29 HWORD rsp; /* Reponse code */ 30 #define CHSC_REQ_OK 0x0001 /* No error */ 31 #define CHSC_REQ_INVALID 0x0002 /* Invalid request */ 32 #define CHSC_REQ_ERRREQ 0x0003 /* Error in request block */ 33 #define CHSC_REQ_NOTSUPP 0x0004 /* Request not supported */ 34 FWORD info; 35 } CHSC_RSP; 36 37 typedef struct _CHSC_RSP4 { 38 BYTE sch_val : 1; /* Subchannel valid */ 39 BYTE dev_val : 1; /* Device number valid */ 40 BYTE st : 3; /* Subchannel type */ 41 #define CHSC_RSP4_ST_IO 0 /* I/O Subchannel; all fields 42 have a meaning */ 43 #define CHSC_RSP4_ST_CHSC 1 /* CHSC Subchannel only sch_val 44 st and sch have a meaning */ 45 #define CHSC_RSP4_ST_MSG 2 /* MSG Subchannel; all fields 46 except unit_addr have a 47 meaning */ 48 #define CHSC_RPS4_ST_ADM 3 /* ADM Subchannel; Only sch_val 49 st and sch have a meaning */ 50 BYTE zeros : 3; 51 BYTE unit_addr; /* Unit address */ 52 HWORD devno; /* Device number */ 53 BYTE path_mask; /* Valid path mask */ 54 BYTE fla_valid_mask; /* Valid link mask */ 55 HWORD sch; /* Subchannel number */ 56 BYTE chpid[8]; /* Channel path array */ 57 BYTE fla[8]; /* Full link address array */ 58 } CHSC_RSP4; 59 60 typedef struct _CHSC_RSP10 { 61 FWORD general_char[510]; 62 FWORD chsc_char[508]; /* ZZ: Linux/390 code indicates 63 this field has a length of 64 518, however, that would 65 mean that the entire CHSC 66 request would be 4K + 16 67 in length which is probably 68 an error - *JJ/10/10/04*/ 69 } CHSC_RSP10; 70 71 // #endif /*defined(FEATURE_CHSC)*/ 72 73 #endif /*!defined(_CHSC_H)*/ 74