From: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
To: Christian Melki <christian.melki@ericsson.com>
Cc: "linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>
Subject: Re: [PATCH] 8250.c: less than 2400 baud fix.
Date: Sun, 29 Apr 2012 22:07:10 -0400 [thread overview]
Message-ID: <20120430020710.GA18098@kroah.com> (raw)
In-Reply-To: <1346E68D3A5B2043907CF4BF466383411A07E00DBB@ESESSCMS0353.eemea.ericsson.se>
On Thu, Apr 26, 2012 at 08:59:50AM +0200, Christian Melki wrote:
> From: Christian Melki <christian.melki@ericsson.se>
>
> We noticed that we were loosing data at speed less than 2400 baud.
> It turned out our (TI16750 compatible) uart with 64 byte outgoing fifo
> was truncated to 16 byte (bit 5 sets fifo len) when modifying the fcr
> reg.
> The input code still fills the buffer with 64 bytes if I remember
> correctly and thus data is lost.
> Our fix was to remove whiping of the fcr content and just add the
> TRIGGER_1 which we want for latency.
> I can't see why this would not work on less than 2400 always, for all
> uarts ...
> Otherwise one would have to make sure the filling of the fifo re-checks
> the current state of available fifo size (urrk).
>
> Signed-off-by: Christian Melki <christian.melki@ericsson.se>
> ---
>
> diff -urpN linux-3.3.2.orig//drivers/tty/serial/8250/8250.c linux-3.3.2/drivers/tty/serial/8250/8250.c
> --- linux-3.3.2.orig//drivers/tty/serial/8250/8250.c 2012-04-25 10:31:29.000000000 +0200
> +++ linux-3.3.2/drivers/tty/serial/8250/8250.c 2012-04-26 08:46:29.000000000 +0200
> @@ -2299,10 +2299,11 @@ serial8250_do_set_termios(struct uart_po
> quot++;
>
> if (up->capabilities & UART_CAP_FIFO && up->port.fifosize > 1) {
> - if (baud < 2400)
> - fcr = UART_FCR_ENABLE_FIFO | UART_FCR_TRIGGER_1;
> - else
> - fcr = uart_config[up->port.type].fcr;
> + fcr = uart_config[up->port.type].fcr;
> + if (baud < 2400) {
> + fcr &= ~UART_FCR_TRIGGER_MASK;
> + fcr |= UART_FCR_TRIGGER_1;
> + }
> }
This patch doesn't apply at all to my tree, and I can't see why with a
quick glance :(
Can you redo this against the linux-next tree and resend it please?
thanks,
greg k-h
next prev parent reply other threads:[~2012-04-30 5:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-26 6:59 [PATCH] 8250.c: less than 2400 baud fix Christian Melki
2012-04-30 2:07 ` gregkh [this message]
2012-04-30 9:21 ` Christian Melki
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=20120430020710.GA18098@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=christian.melki@ericsson.com \
--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