Thread (9 messages) 9 messages, 3 authors, 2012-06-19

RE: Questions regarding adding a patch in linux/drivers/char/8250.c

From: Donald <hidden>
Date: 2012-06-19 12:36:44

Hi Alan,

Thank you for your nice update. I will try to reproduce the crash case on my end and do further analysis. Any update I will keep you
posted. Thanks.

Donald

-----Original Message-----
From: Alan Cox [mailto:alan@lxorguk.ukuu.org.uk] 
Sent: Tuesday, June 19, 2012 5:18 PM
To: Donald
Cc: linux-serial@vger.kernel.org
Subject: Re: Questions regarding adding a patch in linux/drivers/char/8250.c

quoted hunk ↗ jump to hunk
+	struct pci_dev *pdev = container_of(port->dev, struct pci_dev, dev);
+
 	switch (termios->c_cflag & CSIZE) {
 	case CS5:
 		cval = UART_LCR_WLEN5;
@@ -2351,6 +2354,13 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios,
 	if (up->capabilities & UART_CAP_RTOIE)
 		up->ier |= UART_IER_RTOIE;
 
+	if ((termios->c_cflag & PARENB) && (pdev->vendor == 0x9710)) {
+		fcr = UART_FCR_ENABLE_FIFO | UART_FCR_TRIGGER_1;
+		up->ier &= ~UART_IER_RLSI;
+	} else {
+		up->ier |= UART_IER_RLSI;
+	}
+
It's on my TODO list for the 3.6 merge. Your patch doesn't work (in fact it crashes in some cases) because it blindly assumes an
8250 port is on the PCI bus.

However it documents everything I need to know to push an actual fix.

Alan

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help