From: "Mischa Jonker" <m.d.s.x.jonker@gmail.com>
To: "Alan Cox" <alan@lxorguk.ukuu.org.uk>
Cc: "Jonker M.D.S.X." <nlv14114@e3.nl-htc01.nxp.com>,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] serial: pnx8xxx_uart: Fix break signal handling
Date: Tue, 13 Jan 2009 14:22:00 +0100 [thread overview]
Message-ID: <4142f31c0901130522n5273fb67j41cf1aaf7b32853c@mail.gmail.com> (raw)
In-Reply-To: <20090113121135.5565b302@lxorguk.ukuu.org.uk>
On Tue, Jan 13, 2009 at 1:11 PM, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> On Tue, 13 Jan 2009 12:09:13 +0100
> "Jonker M.D.S.X." <nlv14114@e3.nl-htc01.nxp.com> wrote:
>
>> From: Mischa Jonker <mischa.jonker@nxp.com>
>>
>> When a break signal is detected, the next character should be ignored.
>> This was not implemented correctly for the pnx8xxx_uart driver.
>>
>> Signed-off-by: Mischa Jonker <mischa.jonker@nxp.com>
>> ---
>>
>> diff --git a/drivers/serial/pnx8xxx_uart.c b/drivers/serial/pnx8xxx_uart.c
>> index 22e30d2..1bb8f1b 100644
>> --- a/drivers/serial/pnx8xxx_uart.c
>> +++ b/drivers/serial/pnx8xxx_uart.c
>> @@ -187,7 +187,7 @@ static void pnx8xxx_rx_chars(struct pnx8xxx_port *sport)
>> status = FIFO_TO_SM(serial_in(sport, PNX8XXX_FIFO)) |
>> ISTAT_TO_SM(serial_in(sport, PNX8XXX_ISTAT));
>> while (status & FIFO_TO_SM(PNX8XXX_UART_FIFO_RXFIFO)) {
>> - ch = serial_in(sport, PNX8XXX_FIFO);
>> + ch = serial_in(sport, PNX8XXX_FIFO) & 0xff;
>
> This appears to be unrelated.
>
Correct, you can look to it as two separate bugs:
a) the next character is not ignored while it should;
b) the status bits 31-8 are copied to the 'ch' variable while they shouldn't.
Both bugs prevent correct break signal handling (and therefore correct
behaviour of the magic SysRq key). Bug b didn't cause too much trouble
earlier because in most situations the status bits are all zero; for
this case they unfortunately aren't.
I can split them up if you like, or we can keep them together, as they
are in fact related.
Thanks,
Mischa Jonker
next prev parent reply other threads:[~2009-01-13 13:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-13 11:09 Jonker M.D.S.X.
2009-01-13 12:11 ` Alan Cox
2009-01-13 13:22 ` Mischa Jonker [this message]
2009-01-13 13:48 ` Alan Cox
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=4142f31c0901130522n5273fb67j41cf1aaf7b32853c@mail.gmail.com \
--to=m.d.s.x.jonker@gmail.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=nlv14114@e3.nl-htc01.nxp.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
all inboxes | Powered by JetHome®