From patchwork Sun Sep 20 19:11:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: hamzahfrq.sub@gmail.com X-Patchwork-Id: 7226581 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 66E729F40A for ; Sun, 20 Sep 2015 19:11:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9266220673 for ; Sun, 20 Sep 2015 19:11:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B5CB920697 for ; Sun, 20 Sep 2015 19:11:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755505AbbITTLS (ORCPT ); Sun, 20 Sep 2015 15:11:18 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:37296 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755502AbbITTLR (ORCPT ); Sun, 20 Sep 2015 15:11:17 -0400 Received: by wicfx3 with SMTP id fx3so85833499wic.0; Sun, 20 Sep 2015 12:11:16 -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=rjaM0CzG37eqX9Z6HSmahl9DbIW9RWlefD7gZmixQlw=; b=a8sbR9Q3/4u3003yWEjrFrnG4jdXa4XfHhyWaj4zrGkH+Jm2vcDatQ815uJsJPcZAE MueCG8+PpqVGaPfQJKhmzUV8wDTFCI7X0dH150b/AcE+MNZFG/ARnPPDnRvWTuflp/vE EBZdvt04PYkJEIzy2T6QmuW0Xs1XJyfs4w6AZZbNcuLU5tFfE8ZPCX0E5pggZO5T0HKG SSswft8hNiA2U/4GZ2X25ppALbQ6R+foBZxgFL5aHpcblmNyLUTsgJVFyYcmZe5TRvX0 fyCaiUXR/K4IqcoAbn7O/S/XDI8bRktvNdLdzzAiWRHygOxTnmG4zBembjoENf1hMsZH 5yzw== X-Received: by 10.194.105.73 with SMTP id gk9mr21887073wjb.122.1442776276375; Sun, 20 Sep 2015 12:11:16 -0700 (PDT) Received: from ubuntu-VirtualBox.fritz.box (p4FDCDB66.dip0.t-ipconnect.de. [79.220.219.102]) by smtp.googlemail.com with ESMTPSA id fz1sm9644738wic.8.2015.09.20.12.11.15 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 20 Sep 2015 12:11:15 -0700 (PDT) From: hamzahfrq.sub@gmail.com To: laurent.pinchart@ideasonboard.com Cc: dmaengine@vger.kernel.org, j@bitron.ch, joe@perches.com, kuninori.morimoto.gx@renesas.com, broonie@kernel.org, geert+renesas@glider.be, vinod.koul@intel.com, linux-sh@vger.kernel.org, Muhammad Hamza Farooq Subject: [RESEND PATCH 5/6] dma: rcar-dma: warn if transfer cannot start as TE = 1 Date: Sun, 20 Sep 2015 21:11:01 +0200 Message-Id: <1442776262-2503-6-git-send-email-hamzahfrq.sub@gmail.com> X-Mailer: git-send-email 1.7.9.5 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: Muhammad Hamza Farooq Signed-off-by: Muhammad Hamza Farooq --- drivers/dma/sh/rcar-dmac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/dma/sh/rcar-dmac.c b/drivers/dma/sh/rcar-dmac.c index ce21575..d007351 100644 --- a/drivers/dma/sh/rcar-dmac.c +++ b/drivers/dma/sh/rcar-dmac.c @@ -327,7 +327,8 @@ static void rcar_dmac_chan_start_xfer(struct rcar_dmac_chan *chan) struct rcar_dmac_desc *desc = chan->desc.running; u32 chcr = desc->chcr; - WARN_ON_ONCE(rcar_dmac_chan_is_busy(chan)); + WARN_ON_ONCE(rcar_dmac_chan_is_busy(chan) || + rcar_dmac_last_tx_complete(chan)); if (chan->mid_rid >= 0) rcar_dmac_chan_write(chan, RCAR_DMARS, chan->mid_rid);