* [PATCH 3/8] serial: Add an modem status change abstraction
@ 2007-04-26 18:48 Corey Minyard
0 siblings, 0 replies; only message in thread
From: Corey Minyard @ 2007-04-26 18:48 UTC (permalink / raw)
To: Alan Cox, linux-serial
Subject: serial: Add an modem status change abstraction
Add a uart_msr_change function for reporting when modem status line
change, instead of driectly waking up the wait queue.
This is needed for a direct serial interface to be used by IPMI and a
common serial console driver (and probably other things like kgdb).
In that case, they may need to know about modem status, but since they
may be on a polled interface at panic time, a wait queue will not be
helpful. This allows the handling of modem status for a direct serial
interface to be done in the serial core code.
Signed-off-by: Corey Minyard <minyard@acm.org>
drivers/serial/8250.c | 2 +-
include/linux/serial_core.h | 6 ++++++
2 files changed, 7 insertions(+), 1 deletion(-)
Index: linux-2.6.21/drivers/serial/8250.c
===================================================================
--- linux-2.6.21.orig/drivers/serial/8250.c
+++ linux-2.6.21/drivers/serial/8250.c
@@ -1356,7 +1356,7 @@ serial8250_handle_port(struct uart_8250_
uart_push(&up->port);
if (msr_ready)
- wake_up_interruptible(&up->port.info->delta_msr_wait);
+ uart_msr_change(&up->port);
if (xmit_ready)
uart_write_wakeup(&up->port);
Index: linux-2.6.21/include/linux/serial_core.h
===================================================================
--- linux-2.6.21.orig/include/linux/serial_core.h
+++ linux-2.6.21/include/linux/serial_core.h
@@ -529,6 +529,12 @@ uart_push(struct uart_port *port)
tty_flip_buffer_push(port->info->tty);
}
+static inline void
+uart_msr_change(struct uart_port *port)
+{
+ wake_up_interruptible(&port->info->delta_msr_wait);
+}
+
/*
* UART_ENABLE_MS - determine if port should enable modem status irqs
*/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-04-26 18:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-26 18:48 [PATCH 3/8] serial: Add an modem status change abstraction Corey Minyard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).