From: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
To: Thomas Pfaff <tpfaff@pcs.com>
Cc: <gregkh@linuxfoundation.org>, <jslaby@suse.cz>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] serial_core: fix uart PORT_UNKNOWN handling
Date: Wed, 23 Apr 2014 13:34:54 +0100 [thread overview]
Message-ID: <20140423133454.402af61e@alan.etchedpixels.co.uk> (raw)
In-Reply-To: <alpine.LNX.2.00.1404231135450.4361@lxtpfaff.pcs.ditec.de>
On Wed, 23 Apr 2014 12:33:22 +0200
Thomas Pfaff <tpfaff@pcs.com> wrote:
> From: "Thomas Pfaff" <tpfaff@pcs.com>
>
> While porting a RS485 driver from 2.6.29 to 3.14, i noticed that the serial tty
> driver could break it by using uart ports that it does not own :
>
> 1. uart_change_pm ist called during uart_open and calls the uart pm function
> without checking for PORT_UNKNOWN.
> The fix is to move uart_change_pm from uart_open to uart_port_startup.
> 2. The return code from the uart request_port call in uart_set_info is not
> handled properly, leading to the situation that the serial driver also
> thinks it owns the uart ports.
> This can triggered by doing following actions :
>
> setserial /dev/ttyS0 uart none # release the uart ports
> modprobe lirc-serial # or any other device that uses the uart
> setserial /dev/ttyS0 uart 16550 # gives no error and the uart tty driver
> # can use the ports as well
>
> Signed-off-by: Thomas Pfaff <tpfaff@pcs.com>
Reviewed-by: Alan Cox <alan@linux.intel.com>
prev parent reply other threads:[~2014-04-23 12:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-23 10:33 [PATCH v2] serial_core: fix uart PORT_UNKNOWN handling Thomas Pfaff
2014-04-23 12:34 ` One Thousand Gnomes [this message]
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=20140423133454.402af61e@alan.etchedpixels.co.uk \
--to=gnomes@lxorguk.ukuu.org.uk \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=tpfaff@pcs.com \
/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;
as well as URLs for NNTP newsgroup(s).