diff options
Diffstat (limited to 'drivers/s390/cio/css.h')
-rw-r--r-- | drivers/s390/cio/css.h | 43 |
1 files changed, 32 insertions, 11 deletions
diff --git a/drivers/s390/cio/css.h b/drivers/s390/cio/css.h index 2004a6c49388..251ebd7a7d3a 100644 --- a/drivers/s390/cio/css.h +++ b/drivers/s390/cio/css.h | |||
@@ -6,6 +6,8 @@ | |||
6 | 6 | ||
7 | #include <asm/cio.h> | 7 | #include <asm/cio.h> |
8 | 8 | ||
9 | #include "schid.h" | ||
10 | |||
9 | /* | 11 | /* |
10 | * path grouping stuff | 12 | * path grouping stuff |
11 | */ | 13 | */ |
@@ -33,19 +35,25 @@ struct path_state { | |||
33 | __u8 resvd : 3; /* reserved */ | 35 | __u8 resvd : 3; /* reserved */ |
34 | } __attribute__ ((packed)); | 36 | } __attribute__ ((packed)); |
35 | 37 | ||
38 | struct extended_cssid { | ||
39 | u8 version; | ||
40 | u8 cssid; | ||
41 | } __attribute__ ((packed)); | ||
42 | |||
36 | struct pgid { | 43 | struct pgid { |
37 | union { | 44 | union { |
38 | __u8 fc; /* SPID function code */ | 45 | __u8 fc; /* SPID function code */ |
39 | struct path_state ps; /* SNID path state */ | 46 | struct path_state ps; /* SNID path state */ |
40 | } inf; | 47 | } inf; |
41 | __u32 cpu_addr : 16; /* CPU address */ | 48 | union { |
49 | __u32 cpu_addr : 16; /* CPU address */ | ||
50 | struct extended_cssid ext_cssid; | ||
51 | } pgid_high; | ||
42 | __u32 cpu_id : 24; /* CPU identification */ | 52 | __u32 cpu_id : 24; /* CPU identification */ |
43 | __u32 cpu_model : 16; /* CPU model */ | 53 | __u32 cpu_model : 16; /* CPU model */ |
44 | __u32 tod_high; /* high word TOD clock */ | 54 | __u32 tod_high; /* high word TOD clock */ |
45 | } __attribute__ ((packed)); | 55 | } __attribute__ ((packed)); |
46 | 56 | ||
47 | extern struct pgid global_pgid; | ||
48 | |||
49 | #define MAX_CIWS 8 | 57 | #define MAX_CIWS 8 |
50 | 58 | ||
51 | /* | 59 | /* |
@@ -68,7 +76,8 @@ struct ccw_device_private { | |||
68 | atomic_t onoff; | 76 | atomic_t onoff; |
69 | unsigned long registered; | 77 | unsigned long registered; |
70 | __u16 devno; /* device number */ | 78 | __u16 devno; /* device number */ |
71 | __u16 irq; /* subchannel number */ | 79 | __u16 sch_no; /* subchannel number */ |
80 | __u8 ssid; /* subchannel set id */ | ||
72 | __u8 imask; /* lpm mask for SNID/SID/SPGID */ | 81 | __u8 imask; /* lpm mask for SNID/SID/SPGID */ |
73 | int iretry; /* retry counter SNID/SID/SPGID */ | 82 | int iretry; /* retry counter SNID/SID/SPGID */ |
74 | struct { | 83 | struct { |
@@ -121,15 +130,27 @@ struct css_driver { | |||
121 | extern struct bus_type css_bus_type; | 130 | extern struct bus_type css_bus_type; |
122 | extern struct css_driver io_subchannel_driver; | 131 | extern struct css_driver io_subchannel_driver; |
123 | 132 | ||
124 | int css_probe_device(int irq); | 133 | extern int css_probe_device(struct subchannel_id); |
125 | extern struct subchannel * get_subchannel_by_schid(int irq); | 134 | extern struct subchannel * get_subchannel_by_schid(struct subchannel_id); |
126 | extern unsigned int highest_subchannel; | ||
127 | extern int css_init_done; | 135 | extern int css_init_done; |
128 | 136 | extern int for_each_subchannel(int(*fn)(struct subchannel_id, void *), void *); | |
129 | #define __MAX_SUBCHANNELS 65536 | 137 | |
138 | #define __MAX_SUBCHANNEL 65535 | ||
139 | #define __MAX_SSID 3 | ||
140 | #define __MAX_CHPID 255 | ||
141 | #define __MAX_CSSID 0 | ||
142 | |||
143 | struct channel_subsystem { | ||
144 | u8 cssid; | ||
145 | int valid; | ||
146 | struct channel_path *chps[__MAX_CHPID]; | ||
147 | struct device device; | ||
148 | struct pgid global_pgid; | ||
149 | }; | ||
150 | #define to_css(dev) container_of(dev, struct channel_subsystem, device) | ||
130 | 151 | ||
131 | extern struct bus_type css_bus_type; | 152 | extern struct bus_type css_bus_type; |
132 | extern struct device css_bus_device; | 153 | extern struct channel_subsystem *css[]; |
133 | 154 | ||
134 | /* Some helper functions for disconnected state. */ | 155 | /* Some helper functions for disconnected state. */ |
135 | int device_is_disconnected(struct subchannel *); | 156 | int device_is_disconnected(struct subchannel *); |
@@ -144,7 +165,7 @@ void device_set_waiting(struct subchannel *); | |||
144 | void device_kill_pending_timer(struct subchannel *); | 165 | void device_kill_pending_timer(struct subchannel *); |
145 | 166 | ||
146 | /* Helper functions to build lists for the slow path. */ | 167 | /* Helper functions to build lists for the slow path. */ |
147 | int css_enqueue_subchannel_slow(unsigned long schid); | 168 | extern int css_enqueue_subchannel_slow(struct subchannel_id schid); |
148 | void css_walk_subchannel_slow_list(void (*fn)(unsigned long)); | 169 | void css_walk_subchannel_slow_list(void (*fn)(unsigned long)); |
149 | void css_clear_subchannel_slow_list(void); | 170 | void css_clear_subchannel_slow_list(void); |
150 | int css_slow_subchannels_exist(void); | 171 | int css_slow_subchannels_exist(void); |