Re: [PATCH V4 2/2] serial: rp2: New driver for Comtrol RocketPort 2 cards

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

 



On 2013-01-17, Kevin Cernekee <cernekee@xxxxxxxxx> 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            

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux