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.h38
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 */
64struct subchannel; 61struct 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 */
65struct css_driver { 75struct 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 *);
87extern void css_driver_unregister(struct css_driver *); 96extern void css_driver_unregister(struct css_driver *);
88 97
89extern void css_sch_device_unregister(struct subchannel *); 98extern void css_sch_device_unregister(struct subchannel *);
90extern struct subchannel * get_subchannel_by_schid(struct subchannel_id); 99extern int css_probe_device(struct subchannel_id);
100extern struct subchannel *get_subchannel_by_schid(struct subchannel_id);
91extern int css_init_done; 101extern int css_init_done;
92int for_each_subchannel_staged(int (*fn_known)(struct subchannel *, void *), 102int 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 {
119extern struct bus_type css_bus_type; 129extern struct bus_type css_bus_type;
120extern struct channel_subsystem *channel_subsystems[]; 130extern struct channel_subsystem *channel_subsystems[];
121 131
122/* Some helper functions for disconnected state. */
123int device_is_disconnected(struct subchannel *);
124void device_set_disconnected(struct subchannel *);
125void device_trigger_reprobe(struct subchannel *);
126
127/* Helper functions for vary on/off. */
128int device_is_online(struct subchannel *);
129void device_kill_io(struct subchannel *);
130void device_set_intretry(struct subchannel *sch);
131int device_trigger_verify(struct subchannel *sch);
132
133/* Machine check helper function. */
134void 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. */
137void css_schedule_eval(struct subchannel_id schid); 133void css_schedule_eval(struct subchannel_id schid);
138void css_schedule_eval_all(void); 134void css_schedule_eval_all(void);