linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Revert "serial: 8250: Fix max baud limit in generic 8250 port"
@ 2020-06-30 23:42 Daniel Winkler
  2020-07-01  4:30 ` Lukas Wunner
  2020-07-01 13:26 ` Greg Kroah-Hartman
  0 siblings, 2 replies; 6+ messages in thread
From: Daniel Winkler @ 2020-06-30 23:42 UTC (permalink / raw)
  To: linux-serial, linux-mediatek
  Cc: chromeos-bluetooth-upstreaming, Daniel Winkler, Aaron Sierra,
	Andy Shevchenko, Greg Kroah-Hartman, Jiri Slaby, Lukas Wunner,
	Vignesh Raghavendra, linux-kernel

This reverts commit 0eeaf62981ecc79e8395ca8caa1570eaf3a12257.

The change regresses the QCA6174A-3 bluetooth chip, preventing
firmware from being properly loaded. We have verified that without
this patch, the chip works as intended.

Signed-off-by: Daniel Winkler <danielwinkler@google.com>
---

 drivers/tty/serial/8250/8250_port.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
index 1632f7d25acca..e057c65ac1580 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -2618,8 +2618,6 @@ static unsigned int serial8250_get_baud_rate(struct uart_port *port,
 					     struct ktermios *termios,
 					     struct ktermios *old)
 {
-	unsigned int tolerance = port->uartclk / 100;
-
 	/*
 	 * Ask the core to calculate the divisor for us.
 	 * Allow 1% tolerance at the upper limit so uart clks marginally
@@ -2628,7 +2626,7 @@ static unsigned int serial8250_get_baud_rate(struct uart_port *port,
 	 */
 	return uart_get_baud_rate(port, termios, old,
 				  port->uartclk / 16 / UART_DIV_MAX,
-				  (port->uartclk + tolerance) / 16);
+				  port->uartclk);
 }
 
 void
-- 
2.27.0.212.ge8ba1cc988-goog


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-07-01 18:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-30 23:42 [PATCH] Revert "serial: 8250: Fix max baud limit in generic 8250 port" Daniel Winkler
2020-07-01  4:30 ` Lukas Wunner
2020-07-01 11:39   ` Serge Semin
2020-07-01 12:46     ` Alain Michaud
2020-07-01 13:26 ` Greg Kroah-Hartman
2020-07-01 18:26   ` Daniel Winkler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).