From patchwork Mon Nov 3 09:35:43 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmVuw6kgQsO8cmdlbA==?= X-Patchwork-Id: 6893 X-Patchwork-Delegate: grant.likely@secretlab.ca Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id E1DF3DDED6 for ; Mon, 3 Nov 2008 20:37:12 +1100 (EST) X-Original-To: linuxppc-dev@ozlabs.org Delivered-To: linuxppc-dev@ozlabs.org Received: from mo-p00-ob.rzone.de (mo-p00-ob.rzone.de [81.169.146.161]) by ozlabs.org (Postfix) with ESMTP id 789DFDDDEA for ; Mon, 3 Nov 2008 20:36:23 +1100 (EST) X-RZG-CLASS-ID: mo00 X-RZG-AUTH: :O2kGeEG7b/pS1Fi3Qny8h5cV9+njuawu84na/cL5YoHgc/7iwRiKVLzvXfs3/QW1 Received: from obelix.unicontrol.de (pd907c61f.dip0.t-ipconnect.de [217.7.198.31]) by post.webmailer.de (klopstock mo41) (RZmta 17.14) with ESMTP id i040fdkA392Gbu ; Mon, 3 Nov 2008 10:36:15 +0100 (MET) (envelope-from: ) Received: from localhost (localhost [127.0.0.1]) by obelix.unicontrol.de (Postfix on SuSE Linux 8.1 (i386)) with ESMTP id E3A0017DFC; Mon, 3 Nov 2008 10:34:35 +0100 (CET) Received: from [192.168.1.55] (arkturus.unicontrol.de [192.168.1.55]) by obelix.unicontrol.de (Postfix on SuSE Linux 8.1 (i386)) with ESMTP id 27E4017DFB; Mon, 3 Nov 2008 10:34:32 +0100 (CET) Message-ID: <490EC5EF.50609@unicontrol.de> Date: Mon, 03 Nov 2008 10:35:43 +0100 From: =?ISO-8859-1?Q?Ren=E9_B=FCrgel?= User-Agent: Thunderbird 2.0.0.17 (X11/20080930) MIME-Version: 1.0 To: Grant Likely Subject: Re: [PATCH] mpc52xx_uart: report serial errors to users v2 References: <490950AF.1000303@unicontrol.de> In-Reply-To: X-Virus-Scanned: by AMaViS 0.3.12pre8 Cc: linuxppc-dev@ozlabs.org X-BeenThere: linuxppc-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org I regenerated the patch with respect to your comments. Grant Likely wrote: > On Thu, Oct 30, 2008 at 12:14 AM, René Bürgel 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 >> > > 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. > 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++; } }