Make it possible to disable serial console suspend
RFC PATCH 1/1 Make it possible to disable serial console suspend
Hack uart_suspend_port() and uart_resume_port() so that serial console ports are not suspended if CONFIG_DISABLE_CONSOLE_SUSPEND is set.
This makes it possible to debug the suspend and resume routines of all device drivers as well as the lowest-level swsusp code with the help of the serial console.
Signed-off-by Rafael J. Wysocki <[email protected]>
--- drivers/serial/serial_core.c | 14 ++++++++++++++ 1 files changed, 14 insertions(+)
drivers/serial/serial_core.c +14 -0
@@ -1930,6 +1930,13 @@ int uart_suspend_port(struct uart_drivermutex_lock (&state->mutex); +#ifdef CONFIG_DISABLE_CONSOLE_SUSPEND +if (uart_console (port)) { +mutex_unlock (&state->mutex); +return 0 ; + } +#endif +if (state->info && state->info->flags &UIF_INITIALIZED ) {const struct uart_ops *ops = port->ops;
@@ -1968,6 +1975,13 @@ int uart_resume_port(struct uart_drivermutex_lock (&state->mutex); +#ifdef CONFIG_DISABLE_CONSOLE_SUSPEND +if (uart_console (port)) { +mutex_unlock (&state->mutex); +return 0 ; + } +#endif +uart_change_pm (state,0 );/*
Quoted 8 lines · Rafael J. Wysocki
Hack
uart_suspend_port()anduart_resume_port()so that serial console ports are not suspended ifCONFIG_DISABLE_CONSOLE_SUSPENDis set.This makes it possible to debug the suspend and resume routines of all device drivers as well as the lowest-level swsusp code with the help of the serial console.
Signed-off-by Rafael J. Wysocki <[email protected]>
Looks good to me, ACK.
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html