From: "René Bürgel" <r.buergel@unicontrol.de>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] mpc52xx_uart: report serial errors to users v2
Date: Mon, 03 Nov 2008 10:35:43 +0100 [thread overview]
Message-ID: <490EC5EF.50609@unicontrol.de> (raw)
In-Reply-To: <fa686aa40810300819w265c375euff3f46d7bb0a9176@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 987 bytes --]
I regenerated the patch with respect to your comments.
Grant Likely wrote:
> On Thu, Oct 30, 2008 at 12:14 AM, René Bürgel <r.buergel@unicontrol.de> wrote:
>
>> Hi! This patch adds the capability to the mpc52xx-uart to report framing
>> errors, parity errors, breaks and overruns to userspace. These values may be
>> requested in userspace by using the ioctl TIOCGICOUNT.
>>
>> Signed-off-by: René Bürgel <r.buergel@unicontrol.de>
>>
>
> Looks mostly good. A few comments below. Make sure you CC: me when
> you send the next version (which goes for all 5xxx patches).
>
> g.
>
--
René Bürgel
Software Engineer
Unicontrol Systemtechnik GmbH
OT Dittersbach
Sachsenburger Weg 34
09669 Frankenberg
Tel.: 03 72 06/ 88 73 - 19
Fax: 03 72 06/ 88 73 - 60
E-Mail: r.buergel@unicontrol.de
Internet: www.unicontrol.de
Unicontrol Systemtechnik GmbH
Geschäftsführer: Dipl.-Ing. Siegfried Heinze
Sitz der Gesellschaft: Frankenberg
Registergericht: Amtsgericht Chemnitz, HRB 15 475
[-- Attachment #2: 121-mpc52xx_serial_icounter.patch --]
[-- Type: text/plain, Size: 943 bytes --]
diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c
index 6117d3d..2669aec 100644
--- a/drivers/serial/mpc52xx_uart.c
+++ b/drivers/serial/mpc52xx_uart.c
@@ -752,10 +752,15 @@ mpc52xx_uart_int_rx_chars(struct uart_port *port)
if (status & MPC52xx_PSC_SR_RB) {
flag = TTY_BREAK;
uart_handle_break(port);
- } else if (status & MPC52xx_PSC_SR_PE)
+ port->icount.brk++;
+ } else if (status & MPC52xx_PSC_SR_PE) {
flag = TTY_PARITY;
- else if (status & MPC52xx_PSC_SR_FE)
+ port->icount.parity++;
+ }
+ else if (status & MPC52xx_PSC_SR_FE) {
flag = TTY_FRAME;
+ port->icount.frame++;
+ }
/* Clear error condition */
out_8(&PSC(port)->command, MPC52xx_PSC_RST_ERR_STAT);
@@ -769,6 +774,7 @@ mpc52xx_uart_int_rx_chars(struct uart_port *port)
* affect the current character
*/
tty_insert_flip_char(tty, 0, TTY_OVERRUN);
+ port->icount.overrun++;
}
}
prev parent reply other threads:[~2008-11-03 9:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-30 6:14 [PATCH] mpc52xx_uart: report serial errors to users René Bürgel
2008-10-30 15:19 ` Grant Likely
2008-11-03 9:35 ` René Bürgel [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=490EC5EF.50609@unicontrol.de \
--to=r.buergel@unicontrol.de \
--cc=grant.likely@secretlab.ca \
--cc=linuxppc-dev@ozlabs.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;
as well as URLs for NNTP newsgroup(s).