Linux 2.6.17.7
[linux/fpc-iii.git] / drivers / s390 / cio / chsc.h
bloba259245780ae7465d1be49fe442c076d32324585
1 #ifndef S390_CHSC_H
2 #define S390_CHSC_H
4 #define CHSC_SEI_ACC_CHPID 1
5 #define CHSC_SEI_ACC_LINKADDR 2
6 #define CHSC_SEI_ACC_FULLLINKADDR 3
8 #define CHSC_SDA_OC_MSS 0x2
10 struct chsc_header {
11 u16 length;
12 u16 code;
15 #define NR_MEASUREMENT_CHARS 5
16 struct cmg_chars {
17 u32 values[NR_MEASUREMENT_CHARS];
20 #define NR_MEASUREMENT_ENTRIES 8
21 struct cmg_entry {
22 u32 values[NR_MEASUREMENT_ENTRIES];
25 struct channel_path_desc {
26 u8 flags;
27 u8 lsn;
28 u8 desc;
29 u8 chpid;
30 u8 swla;
31 u8 zeroes;
32 u8 chla;
33 u8 chpp;
36 struct channel_path {
37 int id;
38 int state;
39 struct channel_path_desc desc;
40 /* Channel-measurement related stuff: */
41 int cmg;
42 int shared;
43 void *cmg_chars;
44 struct device dev;
47 extern void s390_process_css( void );
48 extern void chsc_validate_chpids(struct subchannel *);
49 extern void chpid_is_actually_online(int);
51 struct css_general_char {
52 u64 : 41;
53 u32 aif : 1; /* bit 41 */
54 u32 : 3;
55 u32 mcss : 1; /* bit 45 */
56 u32 : 2;
57 u32 ext_mb : 1; /* bit 48 */
58 u32 : 7;
59 u32 aif_tdd : 1; /* bit 56 */
60 u32 : 1;
61 u32 qebsm : 1; /* bit 58 */
62 u32 : 8;
63 u32 aif_osa : 1; /* bit 67 */
64 u32 : 28;
65 }__attribute__((packed));
67 struct css_chsc_char {
68 u64 res;
69 u64 : 20;
70 u32 secm : 1; /* bit 84 */
71 u32 : 1;
72 u32 scmc : 1; /* bit 86 */
73 u32 : 20;
74 u32 scssc : 1; /* bit 107 */
75 u32 scsscf : 1; /* bit 108 */
76 u32 : 19;
77 }__attribute__((packed));
79 extern struct css_general_char css_general_characteristics;
80 extern struct css_chsc_char css_chsc_characteristics;
82 extern int chsc_determine_css_characteristics(void);
83 extern int css_characteristics_avail;
85 extern void *chsc_get_chp_desc(struct subchannel*, int);
87 extern int chsc_enable_facility(int);
88 struct channel_subsystem;
89 extern int chsc_secm(struct channel_subsystem *, int);
91 #define to_channelpath(device) container_of(device, struct channel_path, dev)
93 #endif