kernel: bump 6.1 to 6.1.76
[openwrt/staging/stintel.git] / target / linux / bcm27xx / patches-6.1 / 950-0791-serial-sc16is7xx-Read-modem-line-state-at-startup.patch
1 From 52039b6ffb6e78c2f77319b167dceab9aa51d13f Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.com>
3 Date: Tue, 13 Jun 2023 16:12:54 +0100
4 Subject: [PATCH] serial: sc16is7xx: Read modem line state at startup
5
6 This patch sets the driver modem line state to the actual line state
7 at driver startup.
8
9 See: https://github.com/raspberrypi/linux/issues/5501
10
11 Signed-off-by: Earl Schmidt <schmidt.earl.f@gmail.com>
12 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
13 ---
14 drivers/tty/serial/sc16is7xx.c | 3 +++
15 1 file changed, 3 insertions(+)
16
17 --- a/drivers/tty/serial/sc16is7xx.c
18 +++ b/drivers/tty/serial/sc16is7xx.c
19 @@ -1193,6 +1193,9 @@ static int sc16is7xx_startup(struct uart
20 SC16IS7XX_IER_MSI_BIT;
21 sc16is7xx_port_write(port, SC16IS7XX_IER_REG, val);
22
23 + /* Initialize the Modem Control signals to current status */
24 + one->old_mctrl = sc16is7xx_get_hwmctrl(port);
25 +
26 /* Enable modem status polling */
27 uart_port_lock_irqsave(port, &flags);
28 sc16is7xx_enable_ms(port);