]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
[S390] cio: force console function
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 16 Jun 2009 08:30:28 +0000 (10:30 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 16 Jun 2009 08:31:11 +0000 (10:31 +0200)
If something goes wrong in a suspend / resume cycle a ccw based console
if very likely in the suspended state and cannot print anything.
Introduce ccw_device_force_console to force the wake up of the console
device to be able to print the oops message. The console device drivers
should use this function only if the system paniced.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/include/asm/ccwdev.h
drivers/s390/cio/device.c

index 18f0a75809261d9c140addb34aa8c1f42b5bcfc1..2a541955117688b23de8b40557dfd944d1dce02c 100644 (file)
@@ -192,6 +192,7 @@ extern void ccw_device_get_id(struct ccw_device *, struct ccw_dev_id *);
 #define to_ccwdrv(n) container_of(n, struct ccw_driver, driver)
 
 extern struct ccw_device *ccw_device_probe_console(void);
+extern int ccw_device_force_console(void);
 
 // FIXME: these have to go
 extern int _ccw_device_get_subchannel_number(struct ccw_device *);
index 64bd79ac25a78e861afe8201b8ee4379ef8bed63..3c57c1a18bb8772db79a73159a98244ae4c89972 100644 (file)
@@ -1789,6 +1789,15 @@ ccw_device_probe_console(void)
        return &console_cdev;
 }
 
+static int ccw_device_pm_restore(struct device *dev);
+
+int ccw_device_force_console(void)
+{
+       if (!console_cdev_in_use)
+               return -ENODEV;
+       return ccw_device_pm_restore(&console_cdev.dev);
+}
+EXPORT_SYMBOL_GPL(ccw_device_force_console);
 
 const char *cio_get_console_cdev_name(struct subchannel *sch)
 {