Displaying 2 results from an estimated 2 matches for "__ns16550_poll".
2010 Feb 24
4
Re: [Xen-changelog] [xen-3.4-testing] x86: Generalise BUGFRAME_dump mechanism to allow polled UART irq to
...port = data;
> - struct ns16550 *uart = port->uart;
> - struct cpu_user_regs *regs = guest_cpu_user_regs();
> +/* Safe: ns16550_poll() runs in softirq context so not reentrant on a given CPU. */
> +static DEFINE_PER_CPU(struct serial_port *, poll_port);
> +
> +static void __ns16550_poll(struct cpu_user_regs *regs)
> +{
> + struct serial_port *port = this_cpu(poll_port);
> + struct ns16550 *uart = port->uart;
>
> if ( uart->intr_works )
> return; /* Interrupts work - no more polling */
> @@ -166,6 +168,16 @@ static void ns16550_poll(...
2011 Oct 12
1
[PATCH] ns16550: fix poll handling regression
...ince that
bit may not clear for an extended period of time (i.e. when no new
output is generated), it must not be used in this way indefinitely.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- a/xen/drivers/char/ns16550.c
+++ b/xen/drivers/char/ns16550.c
@@ -157,15 +157,18 @@ static void __ns16550_poll(struct cpu_us
{
struct serial_port *port = this_cpu(poll_port);
struct ns16550 *uart = port->uart;
- char lsr;
+ unsigned char lsr, mask = LSR_DR | LSR_THRE;
if ( uart->intr_works )
return; /* Interrupts work - no more polling */
- while ( (lsr = ns_read_...