[S390] dasd: sync after async probe
authorSebastian Ott <sebott@linux.vnet.ibm.com>
Fri, 12 Jun 2009 08:26:38 +0000 (10:26 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 12 Jun 2009 08:27:36 +0000 (10:27 +0200)
Some functions called as a late_initcall depend on completely
initialized devices. Since commit
f3445a1a656bc26b07946cc6d20de1ef07c8d116 the dasd driver uses the
new async framework and relies on the fact that synchronization is
done in prepare_namespace which is called after the late_initcalls.

Fix this by calling async_synchronize_full at the end of the related
init functions.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/block/dasd_eckd.c
drivers/s390/block/dasd_fba.c

index c4e818111a4080ce622bbca6e53abf3385859d7d..216c09bcd222409fd46fa2f9195e07d078e0ed12 100644 (file)
@@ -3277,8 +3277,14 @@ static struct dasd_discipline dasd_eckd_discipline = {
 static int __init
 dasd_eckd_init(void)
 {
+       int ret;
+
        ASCEBC(dasd_eckd_discipline.ebcname, 4);
-       return ccw_driver_register(&dasd_eckd_driver);
+       ret = ccw_driver_register(&dasd_eckd_driver);
+       if (!ret)
+               wait_for_device_probe();
+
+       return ret;
 }
 
 static void __exit
index 8c3c8ffbc8bfe874bc66cd7852511456cc110174..597c6ffdb9f2308258a292a0b584f440f9c0ec6a 100644 (file)
@@ -604,8 +604,14 @@ static struct dasd_discipline dasd_fba_discipline = {
 static int __init
 dasd_fba_init(void)
 {
+       int ret;
+
        ASCEBC(dasd_fba_discipline.ebcname, 4);
-       return ccw_driver_register(&dasd_fba_driver);
+       ret = ccw_driver_register(&dasd_fba_driver);
+       if (!ret)
+               wait_for_device_probe();
+
+       return ret;
 }
 
 static void __exit