Skip to content

Commit 4bd9e3b

Browse files
committed
Merge tag 'tty-6.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
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
2 parents 196856d + 0cfc36e commit 4bd9e3b

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

drivers/tty/serial/8250/8250_core.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -812,6 +812,9 @@ int serial8250_register_8250_port(const struct uart_8250_port *up)
812812
uart->dl_write = up->dl_write;
813813

814814
if (uart->port.type != PORT_8250_CIR) {
815+
if (uart_console_registered(&uart->port))
816+
pm_runtime_get_sync(uart->port.dev);
817+
815818
if (serial8250_isa_config != NULL)
816819
serial8250_isa_config(0, &uart->port,
817820
&uart->capabilities);

drivers/tty/serial/imx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2692,7 +2692,7 @@ static void imx_uart_enable_wakeup(struct imx_port *sport, bool on)
26922692
{
26932693
u32 ucr3;
26942694

2695-
uart_port_lock(&sport->port);
2695+
uart_port_lock_irq(&sport->port);
26962696

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

2717-
uart_port_unlock(&sport->port);
2717+
uart_port_unlock_irq(&sport->port);
27182718
}
27192719

27202720
static int imx_uart_suspend_noirq(struct device *dev)

drivers/tty/serial/stm32-usart.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,14 +1051,14 @@ static void stm32_usart_break_ctl(struct uart_port *port, int break_state)
10511051
const struct stm32_usart_offsets *ofs = &stm32_port->info->ofs;
10521052
unsigned long flags;
10531053

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

10561056
if (break_state)
10571057
stm32_usart_set_bits(port, ofs->rqr, USART_RQR_SBKRQ);
10581058
else
10591059
stm32_usart_clr_bits(port, ofs->rqr, USART_RQR_SBKRQ);
10601060

1061-
spin_unlock_irqrestore(&port->lock, flags);
1061+
uart_port_unlock_irqrestore(port, flags);
10621062
}
10631063

10641064
static int stm32_usart_startup(struct uart_port *port)

0 commit comments

Comments
 (0)