From: Greg Kroah-Hartman Date: Mon, 16 Oct 2023 08:18:49 +0000 (+0200) Subject: Merge 6.6-rc6 into tty-next X-Git-Tag: v6.7-rc1~75^2~55 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fe2017ba24f318e5feef487b7552e40a3de2d50a;p=thirdparty%2Flinux.git Merge 6.6-rc6 into tty-next We need the tty/serial fixes in here as well for testing, and this resolves merge conflicts in: drivers/tty/serial/serial_core.c as reported in linux-next Reported-by: Stephen Rothwell Signed-off-by: Greg Kroah-Hartman --- fe2017ba24f318e5feef487b7552e40a3de2d50a diff --cc drivers/tty/serial/serial_core.c index be74d30cfa9e7,d5ba6e90bd95f..980abb44cf82d --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@@ -1412,7 -1413,9 +1416,9 @@@ static int uart_rs485_config(struct uar uart_sanitize_serial_rs485(port, rs485); uart_set_rs485_termination(port, rs485); - spin_lock_irqsave(&port->lock, flags); ++ uart_port_lock_irqsave(port, &flags); ret = port->rs485_config(port, NULL, rs485); - spin_unlock_irqrestore(&port->lock, flags); ++ uart_port_unlock_irqrestore(port, flags); if (ret) memset(rs485, 0, sizeof(*rs485)); @@@ -2477,13 -2480,12 +2483,12 @@@ int uart_resume_port(struct uart_drive if (ret == 0) { if (tty) uart_change_line_settings(tty, state, NULL); + uart_rs485_config(uport); - spin_lock_irq(&uport->lock); + uart_port_lock_irq(uport); if (!(uport->rs485.flags & SER_RS485_ENABLED)) ops->set_mctrl(uport, uport->mctrl); - else - uart_rs485_config(uport); ops->start_tx(uport); - spin_unlock_irq(&uport->lock); + uart_port_unlock_irq(uport); tty_port_set_initialized(port, true); } else { /* @@@ -2590,10 -2592,10 +2595,10 @@@ uart_configure_port(struct uart_driver port->mctrl &= TIOCM_DTR; if (!(port->rs485.flags & SER_RS485_ENABLED)) port->ops->set_mctrl(port, port->mctrl); - else - uart_rs485_config(port); - spin_unlock_irqrestore(&port->lock, flags); + uart_port_unlock_irqrestore(port, flags); + uart_rs485_config(port); + /* * If this driver supports console, and it hasn't been * successfully registered yet, try to re-register it.