Commit f10ccca7 authored by Sebastian Ott's avatar Sebastian Ott Committed by Martin Schwidefsky

s390/cio: ccw_device_force_console don't use static variable

force_console is used to wake up the CCW based console device to
print a panic message in case something goes wrong in a suspend
or resume cycle. Stop using the static console_subchannel and add
a parameter to this function to specify which ccw device we have
to wake up.
Reviewed-by: default avatarPeter Oberparleiter <oberpar@linux.vnet.ibm.com>
Signed-off-by: default avatarSebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 188561a4
...@@ -221,7 +221,7 @@ extern void ccw_device_get_id(struct ccw_device *, struct ccw_dev_id *); ...@@ -221,7 +221,7 @@ extern void ccw_device_get_id(struct ccw_device *, struct ccw_dev_id *);
extern struct ccw_device *ccw_device_probe_console(void); extern struct ccw_device *ccw_device_probe_console(void);
extern void ccw_device_wait_idle(struct ccw_device *); extern void ccw_device_wait_idle(struct ccw_device *);
extern int ccw_device_force_console(void); extern int ccw_device_force_console(struct ccw_device *);
int ccw_device_siosl(struct ccw_device *); int ccw_device_siosl(struct ccw_device *);
......
...@@ -858,7 +858,7 @@ static void con3215_flush(void) ...@@ -858,7 +858,7 @@ static void con3215_flush(void)
raw = raw3215[0]; /* console 3215 is the first one */ raw = raw3215[0]; /* console 3215 is the first one */
if (raw->port.flags & ASYNC_SUSPENDED) if (raw->port.flags & ASYNC_SUSPENDED)
/* The console is still frozen for suspend. */ /* The console is still frozen for suspend. */
if (ccw_device_force_console()) if (ccw_device_force_console(raw->cdev))
/* Forcing didn't work, no panic message .. */ /* Forcing didn't work, no panic message .. */
return; return;
spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags); spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags);
......
...@@ -1274,7 +1274,7 @@ void raw3270_pm_unfreeze(struct raw3270_view *view) ...@@ -1274,7 +1274,7 @@ void raw3270_pm_unfreeze(struct raw3270_view *view)
rp = view->dev; rp = view->dev;
if (rp && test_bit(RAW3270_FLAGS_FROZEN, &rp->flags)) if (rp && test_bit(RAW3270_FLAGS_FROZEN, &rp->flags))
ccw_device_force_console(); ccw_device_force_console(rp->cdev);
#endif #endif
} }
......
...@@ -1680,11 +1680,9 @@ void ccw_device_wait_idle(struct ccw_device *cdev) ...@@ -1680,11 +1680,9 @@ void ccw_device_wait_idle(struct ccw_device *cdev)
static int ccw_device_pm_restore(struct device *dev); static int ccw_device_pm_restore(struct device *dev);
int ccw_device_force_console(void) int ccw_device_force_console(struct ccw_device *cdev)
{ {
if (!console_cdev_in_use) return ccw_device_pm_restore(&cdev->dev);
return -ENODEV;
return ccw_device_pm_restore(&console_cdev.dev);
} }
EXPORT_SYMBOL_GPL(ccw_device_force_console); EXPORT_SYMBOL_GPL(ccw_device_force_console);
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment