Linux Serial subsystem development
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Donald <donald@asix.com.tw>
Cc: linux-serial@vger.kernel.org
Subject: Re: Questions regarding adding a patch in linux/drivers/char/8250.c
Date: Tue, 19 Jun 2012 10:18:27 +0100	[thread overview]
Message-ID: <20120619101827.150d3968@pyramind.ukuu.org.uk> (raw)
In-Reply-To: <002101cd4cff$74643c70$5d2cb550$@com.tw>


> +	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

  reply	other threads:[~2012-06-19  9:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-21  6:19 Questions regarding adding a patch in linux/drivers/char/8250.c Donald
2012-05-21  9:28 ` Alan Cox
2012-05-29  8:37   ` Donald
2012-06-18  3:07   ` Donald
2012-06-19  9:18     ` Alan Cox [this message]
2012-06-19 12:35       ` Donald
2012-05-21  9:30 ` Alan Cox
2012-05-21 12:54   ` Donald
2012-05-21 15:07   ` Jason Smith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120619101827.150d3968@pyramind.ukuu.org.uk \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=donald@asix.com.tw \
    --cc=linux-serial@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox