[PATCH] tty: fix ldisc flush and termios setting race

2013-02-22 Thread Min Zhang
From: Min Zhang A race condition can clear tty ldisc icanon bit unintentionally which could stop n_tty from processing received characters. It can occur when tty receiver buffer was full, e.g. 4096 chars received, 8250 serial driver interrupt tried to flush_to_ldisc them, but other shell thread

[PATCHv2] serial: 8250 check iir rdi in interrupt

2012-10-26 Thread Min Zhang
es from an hour to days to reproduce by pumping inputs to serial console continously using TeraTerm script: Signed-off-by: Min Zhang --- drivers/tty/serial/8250/8250.c | 50 1 files changed, 50 insertions(+), 0 deletions(-) diff --git a/drivers/tty/serial

Re: [PATCH] serial: 8250 check iir rdi in interrupt

2012-10-26 Thread Min Zhang
On Fri, Oct 26, 2012 at 7:19 AM, Alan Cox wrote: > So we only need to check this in serial8250_handle_irq when IIR indicates > a data timeout interrupt ? > > Can we do > > if ((iir & 0x0F) == 0x0C) { > /* Expensive RDI check */ > } > > > > Alan Checking data timeo

Re: [PATCH] serial: 8250 check iir rdi in interrupt

2012-10-23 Thread Min Zhang
On Tue, Oct 23, 2012 at 3:01 AM, Alan Cox wrote: > > > Added module parameter skip_rdi_check to opt out this workaround. > > NAK. Anything like this should be runtime. One can echo 1 (or 0) > /sys/modules/8250/parameters/skip_rdi_check during run time to turn it off (or on) dynamically. Does it c

[PATCH] serial: 8250 check iir rdi in interrupt

2012-10-22 Thread Min Zhang
The patch works around two UART interrupt bugs when the serial console is flooded with inputs: 1. syslog shows "serial8250: too much works for irq" 2. serial console stops responding to key stroke serial8250_handle_irq() checks UART_IIR_RDI before reading receive fifo and clears bogus interrupt

Re: [PATCH] mlx4: set carrier off after register netdev

2012-10-05 Thread Min Zhang
On Fri, 5 Oct 2012, Ben Hutchings wrote: > On Fri, 2012-10-05 at 11:28 -0700, Min Zhang wrote: > > ifconfig mlx4_en port reported RUNNING even though the link was down. > > > > mlx4_en_init_netdev didn't initialize the dev operstate properly so > >

[PATCH] mlx4: set carrier off after register netdev

2012-10-05 Thread Min Zhang
re is no RUNNING status. Signed-off-by: Min Zhang --- drivers/net/ethernet/mellanox/mlx4/en_netdev.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c index c96113b..8c562f7a 1006

[PATCH 1/2] Preempt realtime Oops syslog

2008-02-15 Thread Min Zhang
tures Signed-off-by: Min Zhang <[EMAIL PROTECTED]> Index: rt-2.6/arch/ppc/kernel/traps.c === --- rt-2.6.orig/arch/ppc/kernel/traps.c +++ rt-2.6/arch/ppc/kernel/traps.c @@ -92,6 +92,7 @@ int die(const char * str, struct pt_regs

[PATCH 2/2] Preempt realtime printk syslog

2008-02-15 Thread Min Zhang
tk in module_init and insmod that kernel module. The printk is in non-preemptive context because modules are loaded from inside a realtime priority thread in a preemptive realtime kernel. Signed-off-by: Min Zhang <[EMAIL PROTECTED]> Index: rt-2.6/kern

[PATCH] arch/x86/kernel/cpu/mcheck/p4.c, kernel 2.6.24-rc5

2007-12-14 Thread Min Zhang
. Refer to Intel system programming guide Part 1 Section 7.8.5 http://developer.intel.com/design/processor/manuals/253668.pdf Signed-off-by: Min Zhang <[EMAIL PROTECTED]> Index: linux-2.6.24-rc5/arch/x86/kernel/cpu/mchec