[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4142f31c0901130522n5273fb67j41cf1aaf7b32853c@mail.gmail.com>
Date: Tue, 13 Jan 2009 14:22:00 +0100
From: "Mischa Jonker" <m.d.s.x.jonker@...il.com>
To: "Alan Cox" <alan@...rguk.ukuu.org.uk>
Cc: "Jonker M.D.S.X." <nlv14114@...nl-htc01.nxp.com>,
linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] serial: pnx8xxx_uart: Fix break signal handling
On Tue, Jan 13, 2009 at 1:11 PM, Alan Cox <alan@...rguk.ukuu.org.uk> wrote:
> On Tue, 13 Jan 2009 12:09:13 +0100
> "Jonker M.D.S.X." <nlv14114@...nl-htc01.nxp.com> wrote:
>
>> From: Mischa Jonker <mischa.jonker@....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@....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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists