public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Pitre <nicolas.pitre@linaro.org>
To: "Jon Medhurst (Tixy)" <tixy@linaro.org>
Cc: Russell King <linux@arm.linux.org.uk>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-serial@vger.kernel.org
Subject: Re: [PATCH] serial: pl011: use port lock to guard control register access
Date: Wed, 4 Dec 2013 11:17:27 -0500 (EST)	[thread overview]
Message-ID: <alpine.LFD.2.10.1312041105470.31246@knanqh.ubzr> (raw)
In-Reply-To: <1386149930.3417.22.camel@linaro1.home>

On Wed, 4 Dec 2013, Jon Medhurst (Tixy) wrote:

> I can't help but think I've missed something fundamental here as it
> seems wrong to be in the situation at all where were initialising
> hardware if it is already being used?
> 
> Also, even with this fix I still see spurious/corrupt output on the
> serial port at the point the port is initialised, so there is obviously
> some other issues in this area.

I don't know if this is still the case nowdays, but that might be due to 
the fact that the tty layer initializes the port speed to 9600 bauds 
when opened.  So there might be a period when the port goes from 115200 
bauds (from the serial console setup) to 9600 bauds, to finally go back 
to 115200 bauds configured by the getty process.  If the serial console 
is in the middle of outputting something when user space opens the port 
then you might see garbled output for a brief period.

[ On some boards the typical speed is 38400 instead of 115200 but the 
  same concern applies. ]

I think that if a serial console has already initialized a port then the 
tty's initial parameters could simply default to those from the already 
active serial console sharing the same port.


Nicolas

  reply	other threads:[~2013-12-04 16:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-04  9:38 [PATCH] serial: pl011: use port lock to guard control register access Jon Medhurst (Tixy)
2013-12-04 16:17 ` Nicolas Pitre [this message]
2013-12-09 17:34   ` Jon Medhurst (Tixy)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.2.10.1312041105470.31246@knanqh.ubzr \
    --to=nicolas.pitre@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=tixy@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox