From patchwork Mon Sep 24 06:19:03 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Leroy X-Patchwork-Id: 186298 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id 382662C0175 for ; Mon, 24 Sep 2012 16:20:59 +1000 (EST) Received: from mailhub1.si.c-s.fr (pegase1.c-s.fr [93.17.236.30]) by ozlabs.org (Postfix) with ESMTP id 07B532C007B for ; Mon, 24 Sep 2012 16:20:29 +1000 (EST) Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 5EAB51C82C9; Mon, 24 Sep 2012 07:20:24 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from mailhub1.si.c-s.fr ([192.168.12.234]) by localhost (mailhub1.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kgRpkO8M2TmR; Mon, 24 Sep 2012 07:20:24 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 3526C1C82B2; Mon, 24 Sep 2012 07:20:24 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 458BCC7392; Mon, 24 Sep 2012 08:20:28 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id ZBWQmc4w96z6; Mon, 24 Sep 2012 08:20:28 +0200 (CEST) Received: from localhost.localdomain (unknown [172.25.231.59]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by messagerie.si.c-s.fr (Postfix) with ESMTP id 1CA39C7391; Mon, 24 Sep 2012 08:20:28 +0200 (CEST) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.13.8/8.13.8) with ESMTP id q8O6JF4w029446; Mon, 24 Sep 2012 08:19:18 +0200 Received: (from root@localhost) by localhost.localdomain (8.13.8/8.13.8/Submit) id q8O6J3Ft029443; Mon, 24 Sep 2012 08:19:03 +0200 Date: Mon, 24 Sep 2012 08:19:03 +0200 Message-Id: <201209240619.q8O6J3Ft029443@localhost.localdomain> From: Christophe Leroy To: Alan Cox , Vitaly Bordug , Marcelo Tosatti Subject: [PATCH] Powerpc 8xx CPM_UART too many interrupts Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Setting the fifo to only 1 byte generates one interrupt every 1ms at 9600 bauds. This is too much. This patch reduces the threshold to speeds below 2400 bauds like in the 8250 UART driver. Signed-off-by: Christophe Leroy --- linux-3.5-vanilla/drivers/tty/serial/cpm_uart/cpm_uart_core.c 2012-07-21 22:58:29.000000000 +0200 +++ linux-3.5/drivers/tty/serial/cpm_uart/cpm_uart_core.c 2012-08-09 17:38:37.000000000 +0200 @@ -71,7 +71,7 @@ /**************************************************************/ -#define HW_BUF_SPD_THRESHOLD 9600 +#define HW_BUF_SPD_THRESHOLD 2400 /* * Check, if transmit buffers are processed @@ -505,7 +505,7 @@ pr_debug("CPM uart[%d]:set_termios\n", port->line); baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk / 16); - if (baud <= HW_BUF_SPD_THRESHOLD || + if (baud < HW_BUF_SPD_THRESHOLD || (pinfo->port.state && pinfo->port.state->port.tty->low_latency)) pinfo->rx_fifosize = 1; else