aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/css.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/cio/css.h')
-rw-r--r--drivers/s390/cio/css.h25
1 files changed, 21 insertions, 4 deletions
diff --git a/drivers/s390/cio/css.h b/drivers/s390/cio/css.h
index 71efca25476d..b74659cab0af 100644
--- a/drivers/s390/cio/css.h
+++ b/drivers/s390/cio/css.h
@@ -35,19 +35,25 @@ struct path_state {
35 __u8 resvd : 3; /* reserved */ 35 __u8 resvd : 3; /* reserved */
36} __attribute__ ((packed)); 36} __attribute__ ((packed));
37 37
38struct extended_cssid {
39 u8 version;
40 u8 cssid;
41} __attribute__ ((packed));
42
38struct pgid { 43struct pgid {
39 union { 44 union {
40 __u8 fc; /* SPID function code */ 45 __u8 fc; /* SPID function code */
41 struct path_state ps; /* SNID path state */ 46 struct path_state ps; /* SNID path state */
42 } inf; 47 } inf;
43 __u32 cpu_addr : 16; /* CPU address */ 48 union {
49 __u32 cpu_addr : 16; /* CPU address */
50 struct extended_cssid ext_cssid;
51 } pgid_high;
44 __u32 cpu_id : 24; /* CPU identification */ 52 __u32 cpu_id : 24; /* CPU identification */
45 __u32 cpu_model : 16; /* CPU model */ 53 __u32 cpu_model : 16; /* CPU model */
46 __u32 tod_high; /* high word TOD clock */ 54 __u32 tod_high; /* high word TOD clock */
47} __attribute__ ((packed)); 55} __attribute__ ((packed));
48 56
49extern struct pgid global_pgid;
50
51#define MAX_CIWS 8 57#define MAX_CIWS 8
52 58
53/* 59/*
@@ -129,9 +135,20 @@ extern int css_init_done;
129extern int for_each_subchannel(int(*fn)(struct subchannel_id, void *), void *); 135extern int for_each_subchannel(int(*fn)(struct subchannel_id, void *), void *);
130 136
131#define __MAX_SUBCHANNEL 65535 137#define __MAX_SUBCHANNEL 65535
138#define __MAX_CHPID 255
139#define __MAX_CSSID 0
140
141struct channel_subsystem {
142 u8 cssid;
143 int valid;
144 struct channel_path *chps[__MAX_CHPID];
145 struct device device;
146 struct pgid global_pgid;
147};
148#define to_css(dev) container_of(dev, struct channel_subsystem, device)
132 149
133extern struct bus_type css_bus_type; 150extern struct bus_type css_bus_type;
134extern struct device css_bus_device; 151extern struct channel_subsystem *css[];
135 152
136/* Some helper functions for disconnected state. */ 153/* Some helper functions for disconnected state. */
137int device_is_disconnected(struct subchannel *); 154int device_is_disconnected(struct subchannel *);