From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: "Janusz Użycki" <j.uzycki@elproma.com.pl>
Cc: Richard Genoud <richard.genoud@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Fabio Estevam <festevam@gmail.com>,
linux-arm-kernel@lists.infradead.org,
linux-serial@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 1/4] serial: mxs-auart: use mctrl_gpio helpers for handling modem signals (v2.2c)
Date: Fri, 26 Sep 2014 14:11:17 +0100 [thread overview]
Message-ID: <20140926131117.GR5182@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <54256326.3080202@elproma.com.pl>
On Fri, Sep 26, 2014 at 02:59:18PM +0200, Janusz Użycki wrote:
> But serial8250_get_mctrl() in 8250_core.c calls serial8250_modem_status()
> which calls eg. uart_handle_cts_change() even if enable_ms() wasn't called.
> This is the difference.
> The serial8250_modem_status() is also called in the interrupt
> and, what I don't understand, in serial8250_console_write().
Reading the MSR register clears the interrupts. So, whenever MSR is read,
you have to deal with any state changes which _would_ have been passed
to the interrupt function.
Plus, it's not quite as you make out above.
If enable_ms() is not called, then UART_IER_MSI will not be set in up->ier.
Hence, uart_handle_cts_change() will not be called.
The reason for the call in the console function is to account for the
state changes during console write with CTS flow control - this again
needs the MSR register to be read, and we have to account for MSR state
changes after the console write has completed.
--
FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up
according to speedtest.net.
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-09-26 13:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-19 18:13 [PATCH 1/4] serial: mxs-auart: use mctrl_gpio helpers for handling modem signals (v2.2c) Janusz Uzycki
2014-09-19 18:13 ` [PATCH 2/4] serial: mxs-auart: add interrupts for modem control lines Janusz Uzycki
[not found] ` <1411150399-30902-1-git-send-email-j.uzycki-9tnw74Q4ehaHKKo6LODCOg@public.gmane.org>
2014-09-19 18:13 ` [PATCH 3/4] serial: mxs-auart: enable PPS support Janusz Uzycki
2014-09-19 18:13 ` [PATCH 4/4] serial: mxs-auart: add sysrq support Janusz Uzycki
2014-09-23 16:18 ` [PATCH 1/4] serial: mxs-auart: use mctrl_gpio helpers for handling modem signals (v2.2c) Janusz Użycki
2014-09-26 12:59 ` Janusz Użycki
2014-09-26 13:11 ` Russell King - ARM Linux [this message]
2014-09-26 13:23 ` Janusz Użycki
-- strict thread matches above, loose matches on Subject: below --
2014-09-19 18:08 Janusz Uzycki
2014-09-19 18:13 ` Janusz Użycki
2014-09-19 18:06 Janusz Uzycki
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=20140926131117.GR5182@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=j.uzycki@elproma.com.pl \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-serial@vger.kernel.org \
--cc=richard.genoud@gmail.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