blob: 170083ca43499905b17c4dc8d853c2983546a438 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef S390_CHSC_H
2#define S390_CHSC_H
3
Linus Torvalds1da177e2005-04-16 15:20:36 -07004#define CHSC_SEI_ACC_CHPID 1
5#define CHSC_SEI_ACC_LINKADDR 2
6#define CHSC_SEI_ACC_FULLLINKADDR 3
7
8struct chsc_header {
9 u16 length;
10 u16 code;
11};
12
13struct channel_path_desc {
14 u8 flags;
15 u8 lsn;
16 u8 desc;
17 u8 chpid;
18 u8 swla;
19 u8 zeroes;
20 u8 chla;
21 u8 chpp;
22};
23
24struct channel_path {
25 int id;
26 int state;
27 struct channel_path_desc desc;
28 struct device dev;
29};
30
31extern void s390_process_css( void );
32extern void chsc_validate_chpids(struct subchannel *);
33extern void chpid_is_actually_online(int);
34
35struct css_general_char {
36 u64 : 41;
37 u32 aif : 1; /* bit 41 */
38 u32 : 3;
39 u32 mcss : 1; /* bit 45 */
40 u32 : 2;
41 u32 ext_mb : 1; /* bit 48 */
42 u32 : 7;
43 u32 aif_tdd : 1; /* bit 56 */
Frank Pavlic8129ee12006-01-06 00:19:20 -080044 u32 : 1;
45 u32 qebsm : 1; /* bit 58 */
46 u32 : 8;
Linus Torvalds1da177e2005-04-16 15:20:36 -070047 u32 aif_osa : 1; /* bit 67 */
48 u32 : 28;
49}__attribute__((packed));
50
51struct css_chsc_char {
52 u64 res;
53 u64 : 43;
54 u32 scssc : 1; /* bit 107 */
55 u32 scsscf : 1; /* bit 108 */
56 u32 : 19;
57}__attribute__((packed));
58
59extern struct css_general_char css_general_characteristics;
60extern struct css_chsc_char css_chsc_characteristics;
61
62extern int chsc_determine_css_characteristics(void);
63extern int css_characteristics_avail;
64
65extern void *chsc_get_chp_desc(struct subchannel*, int);
Cornelia Hucka28c6942006-01-06 00:19:23 -080066
67#define to_channelpath(dev) container_of(dev, struct channel_path, dev)
68
Linus Torvalds1da177e2005-04-16 15:20:36 -070069#endif