Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759940AbZFDQ2k (ORCPT ); Thu, 4 Jun 2009 12:28:40 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757644AbZFDQUP (ORCPT ); Thu, 4 Jun 2009 12:20:15 -0400 Received: from mtagate6.de.ibm.com ([195.212.29.155]:40348 "EHLO mtagate6.de.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757648AbZFDQUO (ORCPT ); Thu, 4 Jun 2009 12:20:14 -0400 Message-Id: <20090604161902.814661884@de.ibm.com> References: <20090604161847.513682672@de.ibm.com> User-Agent: quilt/0.46-1 Date: Thu, 04 Jun 2009 18:19:01 +0200 From: Martin Schwidefsky To: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, linux-pm@lists.linux-foundation.org Cc: Heiko Carstens , Martin Schwidefsky Subject: [patch 14/38] cio: force console function Content-Disposition: inline; filename=pm_force_console.patch Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2083 Lines: 59 From: Martin Schwidefsky 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 Signed-off-by: Martin Schwidefsky --- arch/s390/include/asm/ccwdev.h | 1 + drivers/s390/cio/device.c | 8 ++++++++ 2 files changed, 9 insertions(+) Index: linux-2.5/drivers/s390/cio/device.c =================================================================== --- linux-2.5.orig/drivers/s390/cio/device.c +++ linux-2.5/drivers/s390/cio/device.c @@ -1785,6 +1785,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) { Index: linux-2.5/arch/s390/include/asm/ccwdev.h =================================================================== --- linux-2.5.orig/arch/s390/include/asm/ccwdev.h +++ linux-2.5/arch/s390/include/asm/ccwdev.h @@ -192,6 +192,7 @@ extern void ccw_device_get_id(struct ccw #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 *); -- blue skies, Martin. "Reality continues to ruin my life." - Calvin. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/