Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux...
[deliverable/linux.git] / drivers / s390 / cio / chsc.h
1 #ifndef S390_CHSC_H
2 #define S390_CHSC_H
3
4 #include <linux/types.h>
5 #include <linux/device.h>
6 #include <asm/chpid.h>
7 #include <asm/chsc.h>
8 #include <asm/schid.h>
9
10 #define CHSC_SDA_OC_MSS 0x2
11
12 struct chsc_header {
13 u16 length;
14 u16 code;
15 } __attribute__ ((packed));
16
17 #define NR_MEASUREMENT_CHARS 5
18 struct cmg_chars {
19 u32 values[NR_MEASUREMENT_CHARS];
20 } __attribute__ ((packed));
21
22 #define NR_MEASUREMENT_ENTRIES 8
23 struct cmg_entry {
24 u32 values[NR_MEASUREMENT_ENTRIES];
25 } __attribute__ ((packed));
26
27 struct channel_path_desc {
28 u8 flags;
29 u8 lsn;
30 u8 desc;
31 u8 chpid;
32 u8 swla;
33 u8 zeroes;
34 u8 chla;
35 u8 chpp;
36 } __attribute__ ((packed));
37
38 struct channel_path;
39
40 struct css_chsc_char {
41 u64 res;
42 u64 : 20;
43 u32 secm : 1; /* bit 84 */
44 u32 : 1;
45 u32 scmc : 1; /* bit 86 */
46 u32 : 20;
47 u32 scssc : 1; /* bit 107 */
48 u32 scsscf : 1; /* bit 108 */
49 u32 : 19;
50 }__attribute__((packed));
51
52 extern struct css_chsc_char css_chsc_characteristics;
53
54 struct chsc_ssd_info {
55 u8 path_mask;
56 u8 fla_valid_mask;
57 struct chp_id chpid[8];
58 u16 fla[8];
59 };
60
61 struct chsc_scpd {
62 struct chsc_header request;
63 u32:2;
64 u32 m:1;
65 u32 c:1;
66 u32 fmt:4;
67 u32 cssid:8;
68 u32:4;
69 u32 rfmt:4;
70 u32 first_chpid:8;
71 u32:24;
72 u32 last_chpid:8;
73 u32 zeroes1;
74 struct chsc_header response;
75 u8 data[PAGE_SIZE - 20];
76 } __attribute__ ((packed));
77
78
79 extern int chsc_get_ssd_info(struct subchannel_id schid,
80 struct chsc_ssd_info *ssd);
81 extern int chsc_determine_css_characteristics(void);
82 extern int chsc_init(void);
83 extern void chsc_init_cleanup(void);
84
85 extern int chsc_enable_facility(int);
86 struct channel_subsystem;
87 extern int chsc_secm(struct channel_subsystem *, int);
88 int __chsc_do_secm(struct channel_subsystem *css, int enable);
89
90 int chsc_chp_vary(struct chp_id chpid, int on);
91 int chsc_determine_channel_path_desc(struct chp_id chpid, int fmt, int rfmt,
92 int c, int m, void *page);
93 int chsc_determine_base_channel_path_desc(struct chp_id chpid,
94 struct channel_path_desc *desc);
95 void chsc_chp_online(struct chp_id chpid);
96 void chsc_chp_offline(struct chp_id chpid);
97 int chsc_get_channel_measurement_chars(struct channel_path *chp);
98
99 int chsc_error_from_response(int response);
100
101 int chsc_siosl(struct subchannel_id schid);
102
103 #endif
This page took 0.032885 seconds and 6 git commands to generate.