aboutsummaryrefslogtreecommitdiff
path: root/drivers/s390/cio/css.c
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2009-09-22 22:58:35 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2009-09-22 22:58:41 +0200
commit8ea7f5590142c0b9ab319aa3cae85cf430a207d8 (patch)
treea23b12fbfe51077cc8df6694f4ab7225462b657d /drivers/s390/cio/css.c
parent255305536c1b56ad09590f1400fb2c788265e34e (diff)
[S390] cio: introduce css_settle
Introduce the css_driver callback settle which can be implemented by a subchannel driver to wait for the subchannel type specific asynchronous work to finish. In channel_subsystem_init_sync we call that for each subchannel driver. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio/css.c')
-rw-r--r--drivers/s390/cio/css.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c
index 59c4b94cdb4..f018835afdf 100644
--- a/drivers/s390/cio/css.c
+++ b/drivers/s390/cio/css.c
@@ -1013,6 +1013,15 @@ static int __init channel_subsystem_init(void)
}
subsys_initcall(channel_subsystem_init);
+static int css_settle(struct device_driver *drv, void *unused)
+{
+ struct css_driver *cssdrv = to_cssdriver(drv);
+
+ if (cssdrv->settle)
+ cssdrv->settle();
+ return 0;
+}
+
/*
* Wait for the initialization of devices to finish, to make sure we are
* done with our setup if the search for the root device starts.
@@ -1024,12 +1033,8 @@ static int __init channel_subsystem_init_sync(void)
/* Wait for the evaluation of subchannels to finish. */
wait_event(css_eval_wq, atomic_read(&css_eval_scheduled) == 0);
- /* Wait for the initialization of ccw devices to finish. */
- wait_event(ccw_device_init_wq,
- atomic_read(&ccw_device_init_count) == 0);
- flush_workqueue(ccw_device_work);
-
- return 0;
+ /* Wait for the subchannel type specific initialization to finish */
+ return bus_for_each_drv(&css_bus_type, NULL, NULL, css_settle);
}
subsys_initcall_sync(channel_subsystem_init_sync);