diff mbox series

[2/3] serial: 8250_pci: Re-enable higher baud rates on Pericom chips

Message ID 20211114183908.444923-3-jay.dolan@accesio.com
State New
Headers show
Series None | expand

Commit Message

Jay Dolan Nov. 14, 2021, 6:39 p.m. UTC
Add UPF_MAGIC_MULTIPLIER to Pericom serial ports since there is now
range checking in serial8250_get_baud_rate() in 8250_port.c

Signed-off-by: Jay Dolan <jay.dolan@accesio.com>
---
 drivers/tty/serial/8250/8250_pci.c | 7 +++++++
 1 file changed, 7 insertions(+)
diff mbox series

Patch

diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
index aea43683b76d..5615ac1d2352 100644
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -1352,6 +1352,11 @@  pericom_do_set_divisor(struct uart_port *port, unsigned int baud,
 		}
 	}
 }
+static int pericom_do_startup(struct uart_port *port)
+{
+	port->flags |= UPF_MAGIC_MULTIPLIER;
+	return serial8250_do_startup(port);
+}
 static int pci_pericom_setup(struct serial_private *priv,
 		  const struct pciserial_board *board,
 		  struct uart_8250_port *port, int idx)
@@ -1372,6 +1377,7 @@  static int pci_pericom_setup(struct serial_private *priv,
 		return 1;
 
 	port->port.set_divisor = pericom_do_set_divisor;
+	port->port.startup = pericom_do_startup;
 
 	return setup_port(priv, port, bar, offset, board->reg_shift);
 }
@@ -1398,6 +1404,7 @@  static int pci_pericom_setup_four_at_eight(struct serial_private *priv,
 		return 1;
 
 	port->port.set_divisor = pericom_do_set_divisor;
+	port->port.startup = pericom_do_startup;
 
 	return setup_port(priv, port, bar, offset, board->reg_shift);
 }