Patch "serial: 8250: Define RX trigger levels for OxSemi 950 devices" has been added to the 4.19-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    serial: 8250: Define RX trigger levels for OxSemi 950 devices

to the 4.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     serial-8250-define-rx-trigger-levels-for-oxsemi-950-.patch
and it can be found in the queue-4.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 342348096399bdc6e8106f0acf5e4acc4ea43dc2
Author: Maciej W. Rozycki <macro@xxxxxxxxxxx>
Date:   Sat Jun 26 06:11:51 2021 +0200

    serial: 8250: Define RX trigger levels for OxSemi 950 devices
    
    [ Upstream commit d7aff291d069c4418285f3c8ee27b0ff67ce5998 ]
    
    Oxford Semiconductor 950 serial port devices have a 128-byte FIFO and in
    the enhanced (650) mode, which we select in `autoconfig_has_efr' with
    the ECB bit set in the EFR register, they support the receive interrupt
    trigger level selectable with FCR bits 7:6 from the set of 16, 32, 112,
    120.  This applies to the original OX16C950 discrete UART[1] as well as
    950 cores embedded into more complex devices.
    
    For these devices we set the default to 112, which sets an excessively
    high level of 112 or 7/8 of the FIFO capacity, unlike with other port
    types where we choose at most 1/2 of their respective FIFO capacities.
    Additionally we don't make the trigger level configurable.  Consequently
    frequent input overruns happen with high bit rates where hardware flow
    control cannot be used (e.g. terminal applications) even with otherwise
    highly-performant systems.
    
    Lower the default receive interrupt trigger level to 32 then, and make
    it configurable.  Document the trigger levels along with other port
    types, including the set of 16, 32, 64, 112 for the transmit interrupt
    as well[2].
    
    References:
    
    [1] "OX16C950 rev B High Performance UART with 128 byte FIFOs", Oxford
        Semiconductor, Inc., DS-0031, Sep 05, Table 10: "Receiver Trigger
        Levels", p. 22
    
    [2] same, Table 9: "Transmit Interrupt Trigger Levels", p. 22
    
    Signed-off-by: Maciej W. Rozycki <macro@xxxxxxxxxxx>
    Link: https://lore.kernel.org/r/alpine.DEB.2.21.2106260608480.37803@xxxxxxxxxxxxxxxxx
    Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
index 68f71298c11b..39e821d6e537 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -132,7 +132,8 @@ static const struct serial8250_config uart_config[] = {
 		.name		= "16C950/954",
 		.fifo_size	= 128,
 		.tx_loadsz	= 128,
-		.fcr		= UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10,
+		.fcr		= UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_01,
+		.rxtrig_bytes	= {16, 32, 112, 120},
 		/* UART_CAP_EFR breaks billionon CF bluetooth card. */
 		.flags		= UART_CAP_FIFO | UART_CAP_SLEEP,
 	},
diff --git a/include/uapi/linux/serial_reg.h b/include/uapi/linux/serial_reg.h
index be07b5470f4b..f51bc8f36813 100644
--- a/include/uapi/linux/serial_reg.h
+++ b/include/uapi/linux/serial_reg.h
@@ -62,6 +62,7 @@
  * ST16C654:	 8  16  56  60		 8  16  32  56	PORT_16654
  * TI16C750:	 1  16  32  56		xx  xx  xx  xx	PORT_16750
  * TI16C752:	 8  16  56  60		 8  16  32  56
+ * OX16C950:	16  32 112 120		16  32  64 112	PORT_16C950
  * Tegra:	 1   4   8  14		16   8   4   1	PORT_TEGRA
  */
 #define UART_FCR_R_TRIG_00	0x00



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux