History

Merge tag 'tty-6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull tty/serial driver fixes from Greg KH: "Here are some small tty and serial driver fixes for some reported problems: - fsl_uart driver bugfixes - sh-sci serial driver bugfixes - renesas serial driver DT binding bugfixes - 8250 DMA bugfix All of these have been in linux-next for a while with no reported problems" * tag 'tty-6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: tty: serial: sh-sci: Fix Rx on RZ/G2L SCI tty: serial: fsl_lpuart: fix crash in lpuart_uport_is_active tty: serial: fsl_lpuart: avoid checking for transfer complete when UARTCTRL_SBK is asserted in lpuart32_tx_empty serial: 8250: Prevent starting up DMA Rx on THRI interrupt dt-bindings: serial: renesas,scif: Fix 4th IRQ for 4-IRQ SCIFs tty: serial: sh-sci: Fix transmit end interrupt handler

Linus Torvalds committed 3 years ago

Commit aa46fe32 parents a211b1c f92ed0c4 files · +30 −5Browse files

Unified · Split

4 files
  1. Documentation/devicetree/bindings/serial/renesas,scif.yaml +2 −2
  2. drivers/tty/serial/8250/8250_port.c +11 −0
  3. drivers/tty/serial/fsl_lpuart.c +8 −2
  4. drivers/tty/serial/sh-sci.c +9 −1
Documentation/devicetree/bindings/serial/renesas,scif.yaml+2−2
@@ -92,7 +92,7 @@ properties: · 91 unmodified lines
92 - description: Error interrupt92 - description: Error interrupt
93 - description: Receive buffer full interrupt93 - description: Receive buffer full interrupt
94 - description: Transmit buffer empty interrupt94 - description: Transmit buffer empty interrupt
95 - description: Transmit End interrupt95 - description: Break interrupt
96 - items:96 - items:
97 - description: Error interrupt97 - description: Error interrupt
98 - description: Receive buffer full interrupt98 - description: Receive buffer full interrupt
@@ -107,7 +107,7 @@ properties: · 8 unmodified lines
107 - const: eri107 - const: eri
108 - const: rxi108 - const: rxi
109 - const: txi109 - const: txi
110 - const: tei110 - const: bri
111 - items:111 - items:
112 - const: eri112 - const: eri
113 - const: rxi113 - const: rxi
drivers/tty/serial/8250/8250_port.c+11−0
@@ -1903,6 +1903,17 @@ EXPORT_SYMBOL_GPL(serial8250_modem_status); · 1902 unmodified lines
1903static bool handle_rx_dma(struct uart_8250_port *up, unsigned int iir)1903static bool handle_rx_dma(struct uart_8250_port *up, unsigned int iir)
1904{1904{
1905 switch (iir & 0x3f) {1905 switch (iir & 0x3f) {
1906 case UART_IIR_THRI:
1907 /*
1908 * Postpone DMA or not decision to IIR_RDI or IIR_RX_TIMEOUT
1909 * because it's impossible to do an informed decision about
1910 * that with IIR_THRI.
1911 *
1912 * This also fixes one known DMA Rx corruption issue where
1913 * DR is asserted but DMA Rx only gets a corrupted zero byte
1914 * (too early DR?).
1915 */
1916 return false;
1906 case UART_IIR_RDI:1917 case UART_IIR_RDI:
1907 if (!up->dma->rx_running)1918 if (!up->dma->rx_running)
1908 break;1919 break;
drivers/tty/serial/fsl_lpuart.c+8−2
@@ -858,11 +858,17 @@ static unsigned int lpuart32_tx_empty(struct uart_port *port) · 857 unmodified lines
858 struct lpuart_port, port);858 struct lpuart_port, port);
859 unsigned long stat = lpuart32_read(port, UARTSTAT);859 unsigned long stat = lpuart32_read(port, UARTSTAT);
860 unsigned long sfifo = lpuart32_read(port, UARTFIFO);860 unsigned long sfifo = lpuart32_read(port, UARTFIFO);
861 unsigned long ctrl = lpuart32_read(port, UARTCTRL);
861 862
862 if (sport->dma_tx_in_progress)863 if (sport->dma_tx_in_progress)
863 return 0;864 return 0;
864 865
865 if (stat & UARTSTAT_TC && sfifo & UARTFIFO_TXEMPT)866 /*
867 * LPUART Transmission Complete Flag may never be set while queuing a break
868 * character, so avoid checking for transmission complete when UARTCTRL_SBK
869 * is asserted.
870 */
871 if ((stat & UARTSTAT_TC && sfifo & UARTFIFO_TXEMPT) || ctrl & UARTCTRL_SBK)
866 return TIOCSER_TEMT;872 return TIOCSER_TEMT;
867 873
868 return 0;874 return 0;
@@ -2942,7 +2948,7 @@ static bool lpuart_uport_is_active(struct lpuart_port *sport) · 2073 unmodified lines
2942 tty = tty_port_tty_get(port);2948 tty = tty_port_tty_get(port);
2943 if (tty) {2949 if (tty) {
2944 tty_dev = tty->dev;2950 tty_dev = tty->dev;
2945 may_wake = device_may_wakeup(tty_dev);2951 may_wake = tty_dev && device_may_wakeup(tty_dev);
2946 tty_kref_put(tty);2952 tty_kref_put(tty);
2947 }2953 }
2948 2954
drivers/tty/serial/sh-sci.c+9−1
@@ -31,6 +31,7 @@ · 30 unmodified lines
31#include <linux/ioport.h>31#include <linux/ioport.h>
32#include <linux/ktime.h>32#include <linux/ktime.h>
33#include <linux/major.h>33#include <linux/major.h>
34#include <linux/minmax.h>
34#include <linux/module.h>35#include <linux/module.h>
35#include <linux/mm.h>36#include <linux/mm.h>
36#include <linux/of.h>37#include <linux/of.h>
@@ -2864,6 +2865,13 @@ static int sci_init_single(struct platform_device *dev, · 2827 unmodified lines
2864 sci_port->irqs[i] = platform_get_irq(dev, i);2865 sci_port->irqs[i] = platform_get_irq(dev, i);
2865 }2866 }
2866 2867
2868 /*
2869 * The fourth interrupt on SCI port is transmit end interrupt, so
2870 * shuffle the interrupts.
2871 */
2872 if (p->type == PORT_SCI)
2873 swap(sci_port->irqs[SCIx_BRI_IRQ], sci_port->irqs[SCIx_TEI_IRQ]);
2874
2867 /* The SCI generates several interrupts. They can be muxed together or2875 /* The SCI generates several interrupts. They can be muxed together or
2868 * connected to different interrupt lines. In the muxed case only one2876 * connected to different interrupt lines. In the muxed case only one
2869 * interrupt resource is specified as there is only one interrupt ID.2877 * interrupt resource is specified as there is only one interrupt ID.
@@ -2929,7 +2937,7 @@ static int sci_init_single(struct platform_device *dev, · 59 unmodified lines
2929 port->flags = UPF_FIXED_PORT | UPF_BOOT_AUTOCONF | p->flags;2937 port->flags = UPF_FIXED_PORT | UPF_BOOT_AUTOCONF | p->flags;
2930 port->fifosize = sci_port->params->fifosize;2938 port->fifosize = sci_port->params->fifosize;
2931 2939
2932 if (port->type == PORT_SCI) {2940 if (port->type == PORT_SCI && !dev->dev.of_node) {
2933 if (sci_port->reg_size >= 0x20)2941 if (sci_port->reg_size >= 0x20)
2934 port->regshift = 2;2942 port->regshift = 2;
2935 else2943 else

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t