Re: moxa serial driver testing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[email protected] wrote:
> Hi Jiri,
> 
> I've figured out that both old and new mxser drivers have two similar
> problems:
> 
> 1. When there are data coming to a port, sometimes opening of the port
>    entirely locks the box. This is quite reproducible. Any idea what's
>    wrong and how can I help to debug it?

Could you test the patch below, if something changes?

---

 drivers/char/mxser_new.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/char/mxser_new.c b/drivers/char/mxser_new.c
index a2bca5d..c0af201 100644
--- a/drivers/char/mxser_new.c
+++ b/drivers/char/mxser_new.c
@@ -2268,6 +2268,8 @@ static irqreturn_t mxser_interrupt(int irq, void *dev_id)
 			if (bits & irqbits)
 				continue;
 			port = &brd->ports[i];
+			if (!(port->flags & ASYNC_INITIALIZED))
+				continue;
 
 			int_cnt = 0;
 			do {
@@ -2320,9 +2322,9 @@ static irqreturn_t mxser_interrupt(int irq, void *dev_id)
 					if (status & UART_LSR_THRE)
 						mxser_transmit_chars(port);
 				}
-			} while (int_cnt++ < MXSER_ISR_PASS_LIMIT);
+			} while (int_cnt++ < 256);
 		}
-		if (pass_counter++ > MXSER_ISR_PASS_LIMIT)
+		if (pass_counter++ > 64)
 			break;	/* Prevent infinite loops */
 	}
 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux