diff options
Diffstat (limited to 'drivers/s390/cio/css.h')
-rw-r--r-- | drivers/s390/cio/css.h | 38 |
1 files changed, 17 insertions, 21 deletions
diff --git a/drivers/s390/cio/css.h b/drivers/s390/cio/css.h index e0fc7b499784..4cdc132c86bb 100644 --- a/drivers/s390/cio/css.h +++ b/drivers/s390/cio/css.h | |||
@@ -58,18 +58,27 @@ struct pgid { | |||
58 | __u32 tod_high; /* high word TOD clock */ | 58 | __u32 tod_high; /* high word TOD clock */ |
59 | } __attribute__ ((packed)); | 59 | } __attribute__ ((packed)); |
60 | 60 | ||
61 | /* | ||
62 | * A css driver handles all subchannels of one type. | ||
63 | */ | ||
64 | struct subchannel; | 61 | struct subchannel; |
62 | /** | ||
63 | * struct css_driver - device driver for subchannels | ||
64 | * @owner: owning module | ||
65 | * @subchannel_type: subchannel type supported by this driver | ||
66 | * @drv: embedded device driver structure | ||
67 | * @irq: called on interrupts | ||
68 | * @chp_event: called for events affecting a channel path | ||
69 | * @sch_event: called for events affecting the subchannel | ||
70 | * @probe: function called on probe | ||
71 | * @remove: function called on remove | ||
72 | * @shutdown: called at device shutdown | ||
73 | * @name: name of the device driver | ||
74 | */ | ||
65 | struct css_driver { | 75 | struct css_driver { |
66 | struct module *owner; | 76 | struct module *owner; |
67 | unsigned int subchannel_type; | 77 | unsigned int subchannel_type; |
68 | struct device_driver drv; | 78 | struct device_driver drv; |
69 | void (*irq)(struct subchannel *); | 79 | void (*irq)(struct subchannel *); |
70 | int (*notify)(struct subchannel *, int); | 80 | int (*chp_event)(struct subchannel *, void *, int); |
71 | void (*verify)(struct subchannel *); | 81 | int (*sch_event)(struct subchannel *, int); |
72 | void (*termination)(struct subchannel *); | ||
73 | int (*probe)(struct subchannel *); | 82 | int (*probe)(struct subchannel *); |
74 | int (*remove)(struct subchannel *); | 83 | int (*remove)(struct subchannel *); |
75 | void (*shutdown)(struct subchannel *); | 84 | void (*shutdown)(struct subchannel *); |
@@ -87,7 +96,8 @@ extern int css_driver_register(struct css_driver *); | |||
87 | extern void css_driver_unregister(struct css_driver *); | 96 | extern void css_driver_unregister(struct css_driver *); |
88 | 97 | ||
89 | extern void css_sch_device_unregister(struct subchannel *); | 98 | extern void css_sch_device_unregister(struct subchannel *); |
90 | extern struct subchannel * get_subchannel_by_schid(struct subchannel_id); | 99 | extern int css_probe_device(struct subchannel_id); |
100 | extern struct subchannel *get_subchannel_by_schid(struct subchannel_id); | ||
91 | extern int css_init_done; | 101 | extern int css_init_done; |
92 | int for_each_subchannel_staged(int (*fn_known)(struct subchannel *, void *), | 102 | int for_each_subchannel_staged(int (*fn_known)(struct subchannel *, void *), |
93 | int (*fn_unknown)(struct subchannel_id, | 103 | int (*fn_unknown)(struct subchannel_id, |
@@ -119,20 +129,6 @@ struct channel_subsystem { | |||
119 | extern struct bus_type css_bus_type; | 129 | extern struct bus_type css_bus_type; |
120 | extern struct channel_subsystem *channel_subsystems[]; | 130 | extern struct channel_subsystem *channel_subsystems[]; |
121 | 131 | ||
122 | /* Some helper functions for disconnected state. */ | ||
123 | int device_is_disconnected(struct subchannel *); | ||
124 | void device_set_disconnected(struct subchannel *); | ||
125 | void device_trigger_reprobe(struct subchannel *); | ||
126 | |||
127 | /* Helper functions for vary on/off. */ | ||
128 | int device_is_online(struct subchannel *); | ||
129 | void device_kill_io(struct subchannel *); | ||
130 | void device_set_intretry(struct subchannel *sch); | ||
131 | int device_trigger_verify(struct subchannel *sch); | ||
132 | |||
133 | /* Machine check helper function. */ | ||
134 | void device_kill_pending_timer(struct subchannel *); | ||
135 | |||
136 | /* Helper functions to build lists for the slow path. */ | 132 | /* Helper functions to build lists for the slow path. */ |
137 | void css_schedule_eval(struct subchannel_id schid); | 133 | void css_schedule_eval(struct subchannel_id schid); |
138 | void css_schedule_eval_all(void); | 134 | void css_schedule_eval_all(void); |