From patchwork Mon May 16 08:37:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Jiada" X-Patchwork-Id: 9098971 Return-Path: X-Original-To: patchwork-dmaengine@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AFEA7BF29F for ; Mon, 16 May 2016 08:38:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E867F2028D for ; Mon, 16 May 2016 08:38:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D1EF620274 for ; Mon, 16 May 2016 08:38:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753492AbcEPIiE (ORCPT ); Mon, 16 May 2016 04:38:04 -0400 Received: from relay1.mentorg.com ([192.94.38.131]:33306 "EHLO relay1.mentorg.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752866AbcEPIiC (ORCPT ); Mon, 16 May 2016 04:38:02 -0400 Received: from svr-orw-fem-04.mgc.mentorg.com ([147.34.97.41]) by relay1.mentorg.com with esmtp id 1b2E2L-0001zf-7v from Jiada_Wang@mentor.com ; Mon, 16 May 2016 01:38:01 -0700 Received: from jiwang-OptiPlex-980.tokyo.mentorg.com (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.3.224.2; Mon, 16 May 2016 01:38:00 -0700 From: Jiada Wang To: , CC: , , , Subject: [PATCH 03/10] dma: imx-sdma: clear BD_RROR flag before pass it to sdma script Date: Mon, 16 May 2016 17:37:51 +0900 Message-ID: <1463387878-7643-4-git-send-email-jiada_wang@mentor.com> X-Mailer: git-send-email 2.4.5 In-Reply-To: <1463387878-7643-1-git-send-email-jiada_wang@mentor.com> References: <1463387878-7643-1-git-send-email-jiada_wang@mentor.com> MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 Previously in cyclic dma mode when sdma transfer fails for one buffer, it will mask BD_RROR flag for that buffer descriptor (BD). This flag won't be cleared unless a new cyclic dma transfer is prepared, so if sdma script next time iterates to the same BD, even this time the transfer is successful, but as BD_RROR flag is set, client side will still think the transfer failed. This patch clears BD_RROR flag before pass it to sdma script. Signed-off-by: Jiada Wang --- drivers/dma/imx-sdma.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 887e4e5..1489de0 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -671,6 +671,7 @@ static void sdma_handle_channel_loop(struct sdma_channel *sdmac) if (bd->mode.status & BD_RROR) sdmac->status = DMA_ERROR; + bd->mode.status &= ~BD_RROR; bd->mode.status |= BD_DONE; sdmac->buf_tail++; sdmac->buf_tail %= sdmac->num_bd;