From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66BCAC43381 for ; Tue, 19 Mar 2019 14:44:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2E1022173C for ; Tue, 19 Mar 2019 14:44:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553006699; bh=AUsaGfsVuMAQAtdiTjX1I+0FNkHYP9dQFCx4AVU4g78=; h=Subject:To:From:Date:List-ID:From; b=Zny5apLtg+/CZAuZAj459ytqsO/mCW+YH4YxBifss5+H+kOIJM9As9wRHvISkwFwb V98Xe4oidJWCJlZ8IJA89ebFJ8AU2dU+fK9jZfSRNBH7DhCj+6dK4slC8vDlyFG+VW YiFxB+tWFe2XozU/atFB/TWIMzpmr86Yb8rMQopM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727145AbfCSOo6 (ORCPT ); Tue, 19 Mar 2019 10:44:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:56408 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726661AbfCSOo6 (ORCPT ); Tue, 19 Mar 2019 10:44:58 -0400 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 528B42133D; Tue, 19 Mar 2019 14:44:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553006697; bh=AUsaGfsVuMAQAtdiTjX1I+0FNkHYP9dQFCx4AVU4g78=; h=Subject:To:From:Date:From; b=wMJ3i8UnbtRgFc6d9UBJeeuXlUXyoyuwrCHccDdQzEesasrw6TrrFD5FmV4X0x0zT Qe9IDEooBqrDEYVUa70hUqUSDiqyQFjjzjiQwZTevMDewep5/rEsiq27FEHsFAyfob MLlKqxyDYLLb/wWzp1OatmnYaIyxVEEbCtpS4ois= Subject: patch "serial: sh-sci: Fix setting SCSCR_TIE while transferring data" added to tty-linus To: na-hoan@jinso.co.jp, gregkh@linuxfoundation.org, stable@vger.kernel.org From: Date: Tue, 19 Mar 2019 15:44:28 +0100 Message-ID: <1553006668215111@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org This is a note to let you know that I've just added the patch titled serial: sh-sci: Fix setting SCSCR_TIE while transferring data to my tty git tree which can be found at git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git in the tty-linus branch. The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.) The patch will hopefully also be merged in Linus's tree for the next -rc kernel release. If you have any questions about this process, please let me know. >From 93bcefd4c6bad4c69dbc4edcd3fbf774b24d930d Mon Sep 17 00:00:00 2001 From: Hoan Nguyen An Date: Mon, 18 Mar 2019 18:26:32 +0900 Subject: serial: sh-sci: Fix setting SCSCR_TIE while transferring data We disable transmission interrupt (clear SCSCR_TIE) after all data has been transmitted (if uart_circ_empty(xmit)). While transmitting, if the data is still in the tty buffer, re-enable the SCSCR_TIE bit, which was done at sci_start_tx(). This is unnecessary processing, wasting CPU operation if the data transmission length is large. And further, transmit end, FIFO empty bits disabling have also been performed in the step above. Signed-off-by: Hoan Nguyen An Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/sh-sci.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index 060fcd42b6d5..2d1c626312cd 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -838,19 +838,9 @@ static void sci_transmit_chars(struct uart_port *port) if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) uart_write_wakeup(port); - if (uart_circ_empty(xmit)) { + if (uart_circ_empty(xmit)) sci_stop_tx(port); - } else { - ctrl = serial_port_in(port, SCSCR); - - if (port->type != PORT_SCI) { - serial_port_in(port, SCxSR); /* Dummy read */ - sci_clear_SCxSR(port, SCxSR_TDxE_CLEAR(port)); - } - ctrl |= SCSCR_TIE; - serial_port_out(port, SCSCR, ctrl); - } } /* On SH3, SCIF may read end-of-break as a space->mark char */ -- 2.21.0