Linux-Serial Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] tty: serial: qcom_geni_serial: 115.2 is a better console default than 9600
@ 2020-09-11 15:00 Douglas Anderson
  2020-09-11 15:55 ` Nathan Chancellor
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Douglas Anderson @ 2020-09-11 15:00 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Nick Desaulniers, robdclark, Akash Asthana, Nathan Chancellor,
	jwerner, Douglas Anderson, Andy Gross, Bjorn Andersson,
	Jiri Slaby, linux-arm-msm, linux-kernel, linux-serial

Commit c5cbc78acf69 ("tty: serial: qcom_geni_serial: Initialize baud
in qcom_geni_console_setup") fixed a bug by initting a variable that
was used in some cases without initialization.  However, the "default"
baud rate picked by that CL was probably not the best choice.  The
chances that anyone out there is trying to run a system with kernel
messages piped out over a 9600 baud serial port is just about nil.
Console messages are printed in a blocking manner.  At 9600 baud we
print about 1 character per millisecond which means that printing a
40-byte message to the console will take ~40 ms.  While it would
probably work, it's going to make boot _very_ slow and probably cause
the occasional timeout here and there in drivers (heck, even at 115200
console delays can wreck havoc).

This has already bit at least two people that I'm aware of that tried
to enable serial console by just adding "console=ttyMSM0" (instead of
"console=ttyMSM0,115200n8") to the command line, so it seems like it'd
be nice to fix.

Let's switch the default to 115200.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
---

 drivers/tty/serial/qcom_geni_serial.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c
index f0b1b47c3abc..e390ffc8bbbd 100644
--- a/drivers/tty/serial/qcom_geni_serial.c
+++ b/drivers/tty/serial/qcom_geni_serial.c
@@ -1107,7 +1107,7 @@ static int qcom_geni_console_setup(struct console *co, char *options)
 {
 	struct uart_port *uport;
 	struct qcom_geni_serial_port *port;
-	int baud = 9600;
+	int baud = 115200;
 	int bits = 8;
 	int parity = 'n';
 	int flow = 'n';
-- 
2.28.0.618.gf4bc123cb7-goog


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

* Re: [PATCH] tty: serial: qcom_geni_serial: 115.2 is a better console default than 9600
  2020-09-11 15:00 [PATCH] tty: serial: qcom_geni_serial: 115.2 is a better console default than 9600 Douglas Anderson
@ 2020-09-11 15:55 ` Nathan Chancellor
  2020-09-14  9:59 ` Akash Asthana
  2020-09-14 15:39 ` Bjorn Andersson
  2 siblings, 0 replies; 4+ messages in thread
From: Nathan Chancellor @ 2020-09-11 15:55 UTC (permalink / raw)
  To: Douglas Anderson
  Cc: Greg Kroah-Hartman, Nick Desaulniers, robdclark, Akash Asthana,
	jwerner, Andy Gross, Bjorn Andersson, Jiri Slaby, linux-arm-msm,
	linux-kernel, linux-serial

On Fri, Sep 11, 2020 at 08:00:57AM -0700, Douglas Anderson wrote:
> Commit c5cbc78acf69 ("tty: serial: qcom_geni_serial: Initialize baud
> in qcom_geni_console_setup") fixed a bug by initting a variable that
> was used in some cases without initialization.  However, the "default"
> baud rate picked by that CL was probably not the best choice.  The
> chances that anyone out there is trying to run a system with kernel
> messages piped out over a 9600 baud serial port is just about nil.
> Console messages are printed in a blocking manner.  At 9600 baud we
> print about 1 character per millisecond which means that printing a
> 40-byte message to the console will take ~40 ms.  While it would
> probably work, it's going to make boot _very_ slow and probably cause
> the occasional timeout here and there in drivers (heck, even at 115200
> console delays can wreck havoc).
> 
> This has already bit at least two people that I'm aware of that tried
> to enable serial console by just adding "console=ttyMSM0" (instead of
> "console=ttyMSM0,115200n8") to the command line, so it seems like it'd
> be nice to fix.
> 
> Let's switch the default to 115200.
> 
> Signed-off-by: Douglas Anderson <dianders@chromium.org>

Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>

> ---
> 
>  drivers/tty/serial/qcom_geni_serial.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c
> index f0b1b47c3abc..e390ffc8bbbd 100644
> --- a/drivers/tty/serial/qcom_geni_serial.c
> +++ b/drivers/tty/serial/qcom_geni_serial.c
> @@ -1107,7 +1107,7 @@ static int qcom_geni_console_setup(struct console *co, char *options)
>  {
>  	struct uart_port *uport;
>  	struct qcom_geni_serial_port *port;
> -	int baud = 9600;
> +	int baud = 115200;
>  	int bits = 8;
>  	int parity = 'n';
>  	int flow = 'n';
> -- 
> 2.28.0.618.gf4bc123cb7-goog
> 

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

* Re: [PATCH] tty: serial: qcom_geni_serial: 115.2 is a better console default than 9600
  2020-09-11 15:00 [PATCH] tty: serial: qcom_geni_serial: 115.2 is a better console default than 9600 Douglas Anderson
  2020-09-11 15:55 ` Nathan Chancellor
@ 2020-09-14  9:59 ` Akash Asthana
  2020-09-14 15:39 ` Bjorn Andersson
  2 siblings, 0 replies; 4+ messages in thread
From: Akash Asthana @ 2020-09-14  9:59 UTC (permalink / raw)
  To: Douglas Anderson, Greg Kroah-Hartman
  Cc: Nick Desaulniers, robdclark, Nathan Chancellor, jwerner,
	Andy Gross, Bjorn Andersson, Jiri Slaby, linux-arm-msm,
	linux-kernel, linux-serial


On 9/11/2020 8:30 PM, Douglas Anderson wrote:
> Commit c5cbc78acf69 ("tty: serial: qcom_geni_serial: Initialize baud
> in qcom_geni_console_setup") fixed a bug by initting a variable that
> was used in some cases without initialization.  However, the "default"
> baud rate picked by that CL was probably not the best choice.  The
> chances that anyone out there is trying to run a system with kernel
> messages piped out over a 9600 baud serial port is just about nil.
> Console messages are printed in a blocking manner.  At 9600 baud we
> print about 1 character per millisecond which means that printing a
> 40-byte message to the console will take ~40 ms.  While it would
> probably work, it's going to make boot _very_ slow and probably cause
> the occasional timeout here and there in drivers (heck, even at 115200
> console delays can wreck havoc).
>
> This has already bit at least two people that I'm aware of that tried
> to enable serial console by just adding "console=ttyMSM0" (instead of
> "console=ttyMSM0,115200n8") to the command line, so it seems like it'd
> be nice to fix.
>
> Let's switch the default to 115200.
Reviewed-by: Akash Asthana <akashast@codeaurora.org>
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
> ---
>
>
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,\na Linux Foundation Collaborative Project


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

* Re: [PATCH] tty: serial: qcom_geni_serial: 115.2 is a better console default than 9600
  2020-09-11 15:00 [PATCH] tty: serial: qcom_geni_serial: 115.2 is a better console default than 9600 Douglas Anderson
  2020-09-11 15:55 ` Nathan Chancellor
  2020-09-14  9:59 ` Akash Asthana
@ 2020-09-14 15:39 ` Bjorn Andersson
  2 siblings, 0 replies; 4+ messages in thread
From: Bjorn Andersson @ 2020-09-14 15:39 UTC (permalink / raw)
  To: Douglas Anderson
  Cc: Greg Kroah-Hartman, Nick Desaulniers, robdclark, Akash Asthana,
	Nathan Chancellor, jwerner, Andy Gross, Jiri Slaby,
	linux-arm-msm, linux-kernel, linux-serial

On Fri 11 Sep 10:00 CDT 2020, Douglas Anderson wrote:

> Commit c5cbc78acf69 ("tty: serial: qcom_geni_serial: Initialize baud
> in qcom_geni_console_setup") fixed a bug by initting a variable that
> was used in some cases without initialization.  However, the "default"
> baud rate picked by that CL was probably not the best choice.  The
> chances that anyone out there is trying to run a system with kernel
> messages piped out over a 9600 baud serial port is just about nil.
> Console messages are printed in a blocking manner.  At 9600 baud we
> print about 1 character per millisecond which means that printing a
> 40-byte message to the console will take ~40 ms.  While it would
> probably work, it's going to make boot _very_ slow and probably cause
> the occasional timeout here and there in drivers (heck, even at 115200
> console delays can wreck havoc).
> 
> This has already bit at least two people that I'm aware of that tried
> to enable serial console by just adding "console=ttyMSM0" (instead of
> "console=ttyMSM0,115200n8") to the command line, so it seems like it'd
> be nice to fix.
> 
> Let's switch the default to 115200.
> 

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

> Signed-off-by: Douglas Anderson <dianders@chromium.org>
> ---
> 
>  drivers/tty/serial/qcom_geni_serial.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c
> index f0b1b47c3abc..e390ffc8bbbd 100644
> --- a/drivers/tty/serial/qcom_geni_serial.c
> +++ b/drivers/tty/serial/qcom_geni_serial.c
> @@ -1107,7 +1107,7 @@ static int qcom_geni_console_setup(struct console *co, char *options)
>  {
>  	struct uart_port *uport;
>  	struct qcom_geni_serial_port *port;
> -	int baud = 9600;
> +	int baud = 115200;
>  	int bits = 8;
>  	int parity = 'n';
>  	int flow = 'n';
> -- 
> 2.28.0.618.gf4bc123cb7-goog
> 

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

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-11 15:00 [PATCH] tty: serial: qcom_geni_serial: 115.2 is a better console default than 9600 Douglas Anderson
2020-09-11 15:55 ` Nathan Chancellor
2020-09-14  9:59 ` Akash Asthana
2020-09-14 15:39 ` Bjorn Andersson

Linux-Serial Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-serial/0 linux-serial/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-serial linux-serial/ https://lore.kernel.org/linux-serial \
		linux-serial@vger.kernel.org
	public-inbox-index linux-serial

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-serial


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git