Commit bd5cc6ee authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull tty/serial driver fixes from Greg KH:
 "Here are some small tty and serial driver fixes for 6.2-rc5 that
  resolve a number of tiny reported issues and some new device ids. They
  include:

   - new device id for the exar serial driver

   - speakup tty driver bugfix

   - atmel serial driver baudrate fixup

   - stm32 serial driver bugfix and then revert as the bugfix broke the
     build. That will come back in a later pull request once it is all
     worked out properly.

   - amba-pl011 serial driver rs486 mode bugfix

   - qcom_geni serial driver bugfix

  Most of these have been in linux-next with no reported problems (well,
  other than the build breakage which generated the revert), the new
  device id passed 0-day testing"

* tag 'tty-6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  serial: exar: Add support for Sealevel 7xxxC serial cards
  Revert "serial: stm32: Merge hard IRQ and threaded IRQ handling into single IRQ handler"
  tty: serial: qcom_geni: avoid duplicate struct member init
  serial: atmel: fix incorrect baudrate setup
  tty: fix possible null-ptr-defer in spk_ttyio_release
  serial: stm32: Merge hard IRQ and threaded IRQ handling into single IRQ handler
  serial: amba-pl011: fix high priority character transmission in rs486 mode
  serial: pch_uart: Pass correct sg to dma_unmap_sg()
  tty: serial: qcom-geni-serial: fix slab-out-of-bounds on RX FIFO buffer
parents e67da288 14ee78d5
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -354,6 +354,9 @@ void spk_ttyio_release(struct spk_synth *in_synth)
{
	struct tty_struct *tty = in_synth->dev;

	if (tty == NULL)
		return;

	tty_lock(tty);

	if (tty->ops->close)
+14 −0
Original line number Diff line number Diff line
@@ -43,6 +43,12 @@
#define PCI_DEVICE_ID_EXAR_XR17V4358		0x4358
#define PCI_DEVICE_ID_EXAR_XR17V8358		0x8358

#define PCI_DEVICE_ID_SEALEVEL_710xC		0x1001
#define PCI_DEVICE_ID_SEALEVEL_720xC		0x1002
#define PCI_DEVICE_ID_SEALEVEL_740xC		0x1004
#define PCI_DEVICE_ID_SEALEVEL_780xC		0x1008
#define PCI_DEVICE_ID_SEALEVEL_716xC		0x1010

#define UART_EXAR_INT0		0x80
#define UART_EXAR_8XMODE	0x88	/* 8X sampling rate select */
#define UART_EXAR_SLEEP		0x8b	/* Sleep mode */
@@ -638,6 +644,8 @@ exar_pci_probe(struct pci_dev *pcidev, const struct pci_device_id *ent)
		nr_ports = BIT(((pcidev->device & 0x38) >> 3) - 1);
	else if (board->num_ports)
		nr_ports = board->num_ports;
	else if (pcidev->vendor == PCI_VENDOR_ID_SEALEVEL)
		nr_ports = pcidev->device & 0xff;
	else
		nr_ports = pcidev->device & 0x0f;

@@ -864,6 +872,12 @@ static const struct pci_device_id exar_pci_tbl[] = {
	EXAR_DEVICE(COMMTECH, 4224PCI335, pbn_fastcom335_4),
	EXAR_DEVICE(COMMTECH, 2324PCI335, pbn_fastcom335_4),
	EXAR_DEVICE(COMMTECH, 2328PCI335, pbn_fastcom335_8),

	EXAR_DEVICE(SEALEVEL, 710xC, pbn_exar_XR17V35x),
	EXAR_DEVICE(SEALEVEL, 720xC, pbn_exar_XR17V35x),
	EXAR_DEVICE(SEALEVEL, 740xC, pbn_exar_XR17V35x),
	EXAR_DEVICE(SEALEVEL, 780xC, pbn_exar_XR17V35x),
	EXAR_DEVICE(SEALEVEL, 716xC, pbn_exar_XR17V35x),
	{ 0, }
};
MODULE_DEVICE_TABLE(pci, exar_pci_tbl);
+4 −4
Original line number Diff line number Diff line
@@ -1466,6 +1466,10 @@ static bool pl011_tx_chars(struct uart_amba_port *uap, bool from_irq)
	struct circ_buf *xmit = &uap->port.state->xmit;
	int count = uap->fifosize >> 1;

	if ((uap->port.rs485.flags & SER_RS485_ENABLED) &&
	    !uap->rs485_tx_started)
		pl011_rs485_tx_start(uap);

	if (uap->port.x_char) {
		if (!pl011_tx_char(uap, uap->port.x_char, from_irq))
			return true;
@@ -1477,10 +1481,6 @@ static bool pl011_tx_chars(struct uart_amba_port *uap, bool from_irq)
		return false;
	}

	if ((uap->port.rs485.flags & SER_RS485_ENABLED) &&
	    !uap->rs485_tx_started)
		pl011_rs485_tx_start(uap);

	/* If we are using DMA mode, try to send some characters. */
	if (pl011_dma_tx_irq(uap))
		return true;
+1 −7
Original line number Diff line number Diff line
@@ -2657,13 +2657,7 @@ static void __init atmel_console_get_options(struct uart_port *port, int *baud,
	else if (mr == ATMEL_US_PAR_ODD)
		*parity = 'o';

	/*
	 * The serial core only rounds down when matching this to a
	 * supported baud rate. Make sure we don't end up slightly
	 * lower than one of those, as it would make us fall through
	 * to a much lower baud rate than we really want.
	 */
	*baud = port->uartclk / (16 * (quot - 1));
	*baud = port->uartclk / (16 * quot);
}

static int __init atmel_console_setup(struct console *co, char *options)
+1 −1
Original line number Diff line number Diff line
@@ -749,7 +749,7 @@ static void pch_dma_tx_complete(void *arg)
		uart_xmit_advance(port, sg_dma_len(sg));

	async_tx_ack(priv->desc_tx);
	dma_unmap_sg(port->dev, sg, priv->orig_nent, DMA_TO_DEVICE);
	dma_unmap_sg(port->dev, priv->sg_tx_p, priv->orig_nent, DMA_TO_DEVICE);
	priv->tx_dma_use = 0;
	priv->nent = 0;
	priv->orig_nent = 0;
Loading