From patchwork Wed Apr 29 17:07:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Kaneko X-Patchwork-Id: 6297231 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E02CD9F373 for ; Wed, 29 Apr 2015 17:07:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 123D2201C8 for ; Wed, 29 Apr 2015 17:07:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7CE5B201B9 for ; Wed, 29 Apr 2015 17:07:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966248AbbD2RH5 (ORCPT ); Wed, 29 Apr 2015 13:07:57 -0400 Received: from mail-pd0-f173.google.com ([209.85.192.173]:34510 "EHLO mail-pd0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966240AbbD2RHz (ORCPT ); Wed, 29 Apr 2015 13:07:55 -0400 Received: by pdbqa5 with SMTP id qa5so33763969pdb.1; Wed, 29 Apr 2015 10:07:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=BxSA+N4oa2Kn/y+Uoqa6+jMyz86TuNiEGQRl2qrpSWs=; b=MeJjph1UvBlBw6duS8cKThx3v6DbauNV3gnc/9BS15QDBY+w3KqMBq4xSt59H44E2i HL5MMlpoQackNqPIQu5Pv+dSvEgFvB0xNF9bEUNCJ+CX76OPehiHuTFuKQ4yrsIrruGe kkwUvVzLzo2v4l4nnkbnvFjQgJPTwUrdUtOhtpGREGiQ6+RpqBilCEBojtQ9tIiryOC5 GwIzMBl49OTQaVD2MK7fQ9gUGRAxnALUdXTGAYvjhpnMUsKj9l0yFpm/0z+l9o7VE4Mq ZzKbNn5wmCHmDDgqtJvBoG+4IeIoDzVfjB/gqkkGWErFauxu3ABttgLpApoleE8EM5AB pXsA== X-Received: by 10.66.162.165 with SMTP id yb5mr189264pab.32.1430327272179; Wed, 29 Apr 2015 10:07:52 -0700 (PDT) Received: from localhost.localdomain (KD118152108246.ppp-bb.dion.ne.jp. [118.152.108.246]) by mx.google.com with ESMTPSA id l14sm25696714pdm.16.2015.04.29.10.07.50 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 29 Apr 2015 10:07:51 -0700 (PDT) From: Yoshihiro Kaneko To: linux-serial@vger.kernel.org Cc: Greg Kroah-Hartman , Simon Horman , Magnus Damm , linux-sh@vger.kernel.org Subject: [PATCH/RFC] serial: sh-sci: Remove schedule_work in sci_dma_rx_complete Date: Thu, 30 Apr 2015 02:07:36 +0900 Message-Id: <1430327256-8545-1-git-send-email-ykaneko0929@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Kazuya Mizuguchi This patch calls work_fn_rx() directly so that the driver can avoid executing of next sci_dma_rx_complete() before work_fn_rx() completes. Signed-off-by: Kazuya Mizuguchi Signed-off-by: Yoshihiro Kaneko --- This patch is based on the tty-next branch of Greg Kroah-Hartman's tty tree. drivers/tty/serial/sh-sci.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index e7d6566..664ae78 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -126,6 +126,9 @@ struct sci_port { static void sci_start_tx(struct uart_port *port); static void sci_stop_tx(struct uart_port *port); static void sci_start_rx(struct uart_port *port); +#ifdef CONFIG_SERIAL_SH_SCI_DMA +static void work_fn_rx(struct work_struct *work); +#endif #define SCI_NPORTS CONFIG_SERIAL_SH_SCI_NR_UARTS @@ -1341,7 +1344,7 @@ static void sci_dma_rx_complete(void *arg) if (count) tty_flip_buffer_push(&port->state->port); - schedule_work(&s->work_rx); + work_fn_rx(&s->work_rx); } static void sci_rx_dma_release(struct sci_port *s, bool enable_pio)