|
@@ -131,6 +131,10 @@ static void io_subchannel_shutdown(struct subchannel *);
|
|
|
static int io_subchannel_sch_event(struct subchannel *, int);
|
|
|
static int io_subchannel_chp_event(struct subchannel *, struct chp_link *,
|
|
|
int);
|
|
|
+static void recovery_func(unsigned long data);
|
|
|
+struct workqueue_struct *ccw_device_work;
|
|
|
+wait_queue_head_t ccw_device_init_wq;
|
|
|
+atomic_t ccw_device_init_count;
|
|
|
|
|
|
static struct css_device_id io_subchannel_ids[] = {
|
|
|
{ .match_flags = 0x1, .type = SUBCHANNEL_TYPE_IO, },
|
|
@@ -151,6 +155,13 @@ static int io_subchannel_prepare(struct subchannel *sch)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+static void io_subchannel_settle(void)
|
|
|
+{
|
|
|
+ wait_event(ccw_device_init_wq,
|
|
|
+ atomic_read(&ccw_device_init_count) == 0);
|
|
|
+ flush_workqueue(ccw_device_work);
|
|
|
+}
|
|
|
+
|
|
|
static struct css_driver io_subchannel_driver = {
|
|
|
.owner = THIS_MODULE,
|
|
|
.subchannel_type = io_subchannel_ids,
|
|
@@ -162,14 +173,9 @@ static struct css_driver io_subchannel_driver = {
|
|
|
.remove = io_subchannel_remove,
|
|
|
.shutdown = io_subchannel_shutdown,
|
|
|
.prepare = io_subchannel_prepare,
|
|
|
+ .settle = io_subchannel_settle,
|
|
|
};
|
|
|
|
|
|
-struct workqueue_struct *ccw_device_work;
|
|
|
-wait_queue_head_t ccw_device_init_wq;
|
|
|
-atomic_t ccw_device_init_count;
|
|
|
-
|
|
|
-static void recovery_func(unsigned long data);
|
|
|
-
|
|
|
int __init io_subchannel_init(void)
|
|
|
{
|
|
|
int ret;
|