Commit 6463e54c authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull tty/serial fixes from Greg KH:
 "Here are some small tty/serial driver fixes for 5.14-rc5 to resolve a
  number of reported problems.

  They include:

   - mips serial driver fixes

   - 8250 driver fixes for reported problems

   - fsl_lpuart driver fixes

   - other tiny driver fixes

  All have been in linux-next for a while with no reported problems"

* tag 'tty-5.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  serial: 8250_pci: Avoid irq sharing for MSI(-X) interrupts.
  serial: 8250_mtk: fix uart corruption issue when rx power off
  tty: serial: fsl_lpuart: fix the wrong return value in lpuart32_get_mctrl
  serial: 8250_pci: Enumerate Elkhart Lake UARTs via dedicated driver
  serial: 8250: fix handle_irq locking
  serial: tegra: Only print FIFO error message when an error occurs
  MIPS: Malta: Do not byte-swap accesses to the CBUS UART
  serial: 8250: Mask out floating 16/32-bit bus bits
  serial: max310x: Unprepare and disable clock in error path
parents 6a655547 341abd69
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -48,7 +48,8 @@ static struct plat_serial8250_port uart8250_data[] = {
		.mapbase	= 0x1f000900,	/* The CBUS UART */
		.irq		= MIPS_CPU_IRQ_BASE + MIPSCPU_INT_MB2,
		.uartclk	= 3686400,	/* Twice the usual clk! */
		.iotype		= UPIO_MEM32,
		.iotype		= IS_ENABLED(CONFIG_CPU_BIG_ENDIAN) ?
				  UPIO_MEM32BE : UPIO_MEM32,
		.flags		= CBUS_UART_FLAGS,
		.regshift	= 3,
	},
+3 −2
Original line number Diff line number Diff line
@@ -329,6 +329,7 @@ static int aspeed_vuart_handle_irq(struct uart_port *port)
{
	struct uart_8250_port *up = up_to_u8250p(port);
	unsigned int iir, lsr;
	unsigned long flags;
	unsigned int space, count;

	iir = serial_port_in(port, UART_IIR);
@@ -336,7 +337,7 @@ static int aspeed_vuart_handle_irq(struct uart_port *port)
	if (iir & UART_IIR_NO_INT)
		return 0;

	spin_lock(&port->lock);
	spin_lock_irqsave(&port->lock, flags);

	lsr = serial_port_in(port, UART_LSR);

@@ -370,7 +371,7 @@ static int aspeed_vuart_handle_irq(struct uart_port *port)
	if (lsr & UART_LSR_THRE)
		serial8250_tx_chars(up);

	uart_unlock_and_check_sysrq(port);
	uart_unlock_and_check_sysrq_irqrestore(port, flags);

	return 1;
}
+3 −2
Original line number Diff line number Diff line
@@ -30,10 +30,11 @@ struct fsl8250_data {
int fsl8250_handle_irq(struct uart_port *port)
{
	unsigned char lsr, orig_lsr;
	unsigned long flags;
	unsigned int iir;
	struct uart_8250_port *up = up_to_u8250p(port);

	spin_lock(&up->port.lock);
	spin_lock_irqsave(&up->port.lock, flags);

	iir = port->serial_in(port, UART_IIR);
	if (iir & UART_IIR_NO_INT) {
@@ -82,7 +83,7 @@ int fsl8250_handle_irq(struct uart_port *port)

	up->lsr_saved_flags = orig_lsr;

	uart_unlock_and_check_sysrq(&up->port);
	uart_unlock_and_check_sysrq_irqrestore(&up->port, flags);

	return 1;
}
+5 −0
Original line number Diff line number Diff line
@@ -93,10 +93,13 @@ static void mtk8250_dma_rx_complete(void *param)
	struct dma_tx_state state;
	int copied, total, cnt;
	unsigned char *ptr;
	unsigned long flags;

	if (data->rx_status == DMA_RX_SHUTDOWN)
		return;

	spin_lock_irqsave(&up->port.lock, flags);

	dmaengine_tx_status(dma->rxchan, dma->rx_cookie, &state);
	total = dma->rx_size - state.residue;
	cnt = total;
@@ -120,6 +123,8 @@ static void mtk8250_dma_rx_complete(void *param)
	tty_flip_buffer_push(tty_port);

	mtk8250_rx_dma(up);

	spin_unlock_irqrestore(&up->port.lock, flags);
}

static void mtk8250_rx_dma(struct uart_8250_port *up)
+7 −0
Original line number Diff line number Diff line
@@ -3836,6 +3836,12 @@ static const struct pci_device_id blacklist[] = {
	{ PCI_VDEVICE(INTEL, 0x0f0c), },
	{ PCI_VDEVICE(INTEL, 0x228a), },
	{ PCI_VDEVICE(INTEL, 0x228c), },
	{ PCI_VDEVICE(INTEL, 0x4b96), },
	{ PCI_VDEVICE(INTEL, 0x4b97), },
	{ PCI_VDEVICE(INTEL, 0x4b98), },
	{ PCI_VDEVICE(INTEL, 0x4b99), },
	{ PCI_VDEVICE(INTEL, 0x4b9a), },
	{ PCI_VDEVICE(INTEL, 0x4b9b), },
	{ PCI_VDEVICE(INTEL, 0x9ce3), },
	{ PCI_VDEVICE(INTEL, 0x9ce4), },

@@ -3996,6 +4002,7 @@ pciserial_init_ports(struct pci_dev *dev, const struct pciserial_board *board)
		if (pci_match_id(pci_use_msi, dev)) {
			dev_dbg(&dev->dev, "Using MSI(-X) interrupts\n");
			pci_set_master(dev);
			uart.port.flags &= ~UPF_SHARE_IRQ;
			rc = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_ALL_TYPES);
		} else {
			dev_dbg(&dev->dev, "Using legacy interrupts\n");
Loading