From patchwork Tue May 17 03:48:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Jiada" X-Patchwork-Id: 9108671 Return-Path: X-Original-To: patchwork-dmaengine@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 7101B9F30C for ; Tue, 17 May 2016 03:51:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6D6A520268 for ; Tue, 17 May 2016 03:51:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 89607201B9 for ; Tue, 17 May 2016 03:51:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755232AbcEQDvN (ORCPT ); Mon, 16 May 2016 23:51:13 -0400 Received: from relay1.mentorg.com ([192.94.38.131]:38240 "EHLO relay1.mentorg.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754847AbcEQDtD (ORCPT ); Mon, 16 May 2016 23:49:03 -0400 Received: from svr-orw-fem-05.mgc.mentorg.com ([147.34.97.43]) by relay1.mentorg.com with esmtp id 1b2W0E-0004yL-Ge from Jiada_Wang@mentor.com ; Mon, 16 May 2016 20:49:02 -0700 Received: from jiwang-OptiPlex-980.tokyo.mentorg.com (147.34.91.1) by svr-orw-fem-05.mgc.mentorg.com (147.34.97.43) with Microsoft SMTP Server id 14.3.224.2; Mon, 16 May 2016 20:49:02 -0700 From: Jiada Wang To: , CC: , , , , , Subject: [PATCH 04/10] dma: imx-sdma: update sdma channel status for cyclic dma Date: Tue, 17 May 2016 12:48:50 +0900 Message-ID: <1463456936-10634-5-git-send-email-jiada_wang@mentor.com> X-Mailer: git-send-email 2.4.5 In-Reply-To: <1463456936-10634-1-git-send-email-jiada_wang@mentor.com> References: <1463456936-10634-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 for cyclic dma mode, once sdma fails sdma channel status will be set to DMA_ERROR, unless the transfer is prepared again, sdmac status will always be kept to DMA_ERROR, even the transfer for following buffers is successful. This patch updates sdmac status to the status of current buffer descriptor. Signed-off-by: Jiada Wang --- drivers/dma/imx-sdma.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 1489de0..36f5e39 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -670,6 +670,8 @@ static void sdma_handle_channel_loop(struct sdma_channel *sdmac) if (bd->mode.status & BD_RROR) sdmac->status = DMA_ERROR; + else + sdmac->status = DMA_IN_PROGRESS; bd->mode.status &= ~BD_RROR; bd->mode.status |= BD_DONE;