Skip to content

Commit cc994bb

Browse files
tmlindgregkh
authored andcommitted
serial: 8250: Fix runtime PM for start_tx() for empty buffer
Commit 932d596 ("serial: 8250: Return early in .start_tx() if there are no chars to send") caused a regression where the drivers implementing runtime PM stopped idling. This is because serial8250_rpm_put_tx() is now unbalanced on early return, it normally gets called at __stop_tx(). Fixes: 932d596 ("serial: 8250: Return early in .start_tx() if there are no chars to send") Cc: Steffen Trumtrar <[email protected]> Cc: Uwe Kleine-König <[email protected]> Reviewed-by: Johan Hovold <[email protected]> Reviewed-by: Uwe Kleine-König <[email protected]> Signed-off-by: Tony Lindgren <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 3ee82c6 commit cc994bb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/tty/serial/8250/8250_port.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1675,11 +1675,11 @@ static void serial8250_start_tx(struct uart_port *port)
16751675
struct uart_8250_port *up = up_to_u8250p(port);
16761676
struct uart_8250_em485 *em485 = up->em485;
16771677

1678-
serial8250_rpm_get_tx(up);
1679-
16801678
if (!port->x_char && uart_circ_empty(&port->state->xmit))
16811679
return;
16821680

1681+
serial8250_rpm_get_tx(up);
1682+
16831683
if (em485 &&
16841684
em485->active_timer == &em485->start_tx_timer)
16851685
return;

0 commit comments

Comments
 (0)