Commit 4bd9e3b4 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull serial driver fixes from Greg KH:
 "Here are three small serial driver fixes tree. They resolve some
  reported issues:

   - stm32 break control fix

   - 8250 runtime pm usage counter fix

   - imx driver locking fix

  All have been in my tree and linux-next for three weeks now, with no
  reported issues"

* tag 'tty-6.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  serial: stm32: use port lock wrappers for break control
  serial: imx: Use uart_port_lock_irq() instead of uart_port_lock()
  tty: serial: 8250: Fix another runtime PM usage counter underflow
parents 196856db 0cfc36ea
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -812,6 +812,9 @@ int serial8250_register_8250_port(const struct uart_8250_port *up)
			uart->dl_write = up->dl_write;

		if (uart->port.type != PORT_8250_CIR) {
			if (uart_console_registered(&uart->port))
				pm_runtime_get_sync(uart->port.dev);

			if (serial8250_isa_config != NULL)
				serial8250_isa_config(0, &uart->port,
						&uart->capabilities);
+2 −2
Original line number Diff line number Diff line
@@ -2692,7 +2692,7 @@ static void imx_uart_enable_wakeup(struct imx_port *sport, bool on)
{
	u32 ucr3;

	uart_port_lock(&sport->port);
	uart_port_lock_irq(&sport->port);

	ucr3 = imx_uart_readl(sport, UCR3);
	if (on) {
@@ -2714,7 +2714,7 @@ static void imx_uart_enable_wakeup(struct imx_port *sport, bool on)
		imx_uart_writel(sport, ucr1, UCR1);
	}

	uart_port_unlock(&sport->port);
	uart_port_unlock_irq(&sport->port);
}

static int imx_uart_suspend_noirq(struct device *dev)
+2 −2
Original line number Diff line number Diff line
@@ -1051,14 +1051,14 @@ static void stm32_usart_break_ctl(struct uart_port *port, int break_state)
	const struct stm32_usart_offsets *ofs = &stm32_port->info->ofs;
	unsigned long flags;

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

	if (break_state)
		stm32_usart_set_bits(port, ofs->rqr, USART_RQR_SBKRQ);
	else
		stm32_usart_clr_bits(port, ofs->rqr, USART_RQR_SBKRQ);

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

static int stm32_usart_startup(struct uart_port *port)