From: Grant Edwards <grant.b.edwards@gmail.com>
To: linux-serial@vger.kernel.org
Subject: Re: [PATCH V4 2/2] serial: rp2: New driver for Comtrol RocketPort 2 cards
Date: Tue, 29 Jan 2013 16:14:54 +0000 (UTC) [thread overview]
Message-ID: <ke8shu$7on$1@ger.gmane.org> (raw)
In-Reply-To: cddfa2c3b23f14c35109a07544c6a2bf@localhost
On 2013-01-17, Kevin Cernekee <cernekee@gmail.com> wrote:
> This driver supports the RocketPort EXPRESS and RocketPort INFINITY
> families of PCI/PCIe multiport serial adapters. These adapters use a
> "RocketPort 2" ASIC that is not compatible with the original RocketPort
> driver (CONFIG_ROCKETPORT).
RTS/CTS receive flow control doesn't work: RTS is never de-asserted
when receive buffers fill up, and receive data is lost.
In order for receive flow control logic in the UART to kick in, you
have to stop reading data from the rx FIFO when you've got nowhere to
put it. When the rx FIFO fills to 7/8, the UART will (if so
configured) de-assert RTS and/or send Xoff. Fix is shown below:
> +static void rp2_rx_chars(struct rp2_uart_port *up)
> +{
> + u16 bytes = readw(up->base + RP2_RX_FIFO_COUNT);
> + struct tty_port *port = &up->port.state->port;
if (bytes > port->tty->receive_room)
bytes = port->tty->receive_room;
> + for (; bytes != 0; bytes--) {
> + u32 byte = readw(up->base + RP2_DATA_BYTE) | RP2_DUMMY_READ;
> + char ch = byte & 0xff;
[...]
This will allow both RTS and Xon/Xoff receive flow control to be
handled by the UART itself.
--
Grant Edwards grant.b.edwards Yow! YOU PICKED KARL
at MALDEN'S NOSE!!
gmail.com
next prev parent reply other threads:[~2013-01-29 16:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-17 4:28 [PATCH V2 1/2] tty: rocket: Explicitly list supported PCI IDs Kevin Cernekee
2013-01-17 4:28 ` [PATCH V4 2/2] serial: rp2: New driver for Comtrol RocketPort 2 cards Kevin Cernekee
2013-01-29 16:14 ` Grant Edwards [this message]
2013-02-19 19:40 ` Grant Edwards
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='ke8shu$7on$1@ger.gmane.org' \
--to=grant.b.edwards@gmail.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;
as well as URLs for NNTP newsgroup(s).