From patchwork Fri Oct 25 06:32:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 3094331 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 675AA9F2B7 for ; Fri, 25 Oct 2013 06:32:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8153B20490 for ; Fri, 25 Oct 2013 06:32:54 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 09C69203EC for ; Fri, 25 Oct 2013 06:32:53 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VZawx-0003hr-I0; Fri, 25 Oct 2013 06:32:47 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VZawv-0003rq-7A; Fri, 25 Oct 2013 06:32:45 +0000 Received: from moutng.kundenserver.de ([212.227.17.10]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VZaws-0003rT-ME for linux-arm-kernel@lists.infradead.org; Fri, 25 Oct 2013 06:32:43 +0000 Received: from axis700.grange (dslb-088-076-030-064.pools.arcor-ip.net [88.76.30.64]) by mrelayeu.kundenserver.de (node=mreu3) with ESMTP (Nemesis) id 0MXjM2-1VEEpe32AQ-00WZ4D; Fri, 25 Oct 2013 08:32:13 +0200 Received: by axis700.grange (Postfix, from userid 1000) id 5305240BB4; Fri, 25 Oct 2013 08:32:12 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by axis700.grange (Postfix) with ESMTP id 464D940BB3; Fri, 25 Oct 2013 08:32:12 +0200 (CEST) Date: Fri, 25 Oct 2013 08:32:12 +0200 (CEST) From: Guennadi Liakhovetski X-X-Sender: lyakh@axis700.grange To: Vinod Koul Subject: Re: [PATCH 01/28] dmaengine: use DMA_COMPLETE for dma completion status In-Reply-To: <20131025042310.GC21230@intel.com> Message-ID: References: <1381940926-25564-1-git-send-email-vinod.koul@intel.com> <1381940926-25564-2-git-send-email-vinod.koul@intel.com> <20131017020745.GA14013@intel.com> <20131017142755.GA4477@breakpoint.cc> <20131017134846.GG14013@intel.com> <20131025042310.GC21230@intel.com> MIME-Version: 1.0 X-Provags-ID: V02:K0:u5RevS61emX0mfsQFOgAhQejLLL1seHw5svnoRU/O8r W5IWA+kezRbuToZkqh884n46Sz3jg4OJyWoZBo6mzDO7GMvoA3 +xpmYnDkaOFlCBRcD5Hu2rUrWjzI/UpCTCG2ypWWQcG2BcV0yU VsJsaept7zIdLNz6HYulh48QmREMiwRSE6odGpGgBiYbmEssRp UuZUTgtIP6am12QWO1MLk23vUyi4Fc/IOlIOAacDqve8aGL2ax esJsrxMMDGih20Fos5ClsbPnnV9NwNHb59onSCpA09iGYGRgL2 kt1MXpvz7QqP/4YcBQvxAuR9BPsbOOIby7F7n/PJIVOiMtG49l +E9IEpwSmh+WT5iYJYlLU5N6JmzgmVafxoGbB9RHena0j1v6Ru v3wO7e1Z8LuMw== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131025_023242_916629_917231BA X-CRM114-Status: GOOD ( 19.14 ) X-Spam-Score: -2.3 (--) Cc: Sebastian Andrzej Siewior , linux@arm.linux.org.uk, Dan Williams , linux-arm-kernel@lists.infradead.org, "linux-kernel@vger.kernel.org" X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Hi Vinod On Fri, 25 Oct 2013, Vinod Koul wrote: > On Thu, Oct 24, 2013 at 11:28:29PM +0200, Guennadi Liakhovetski wrote: > > Hi Vinod > > > > On Thu, 17 Oct 2013, Vinod Koul wrote: > > > Yes i missed it in first place update the patch to fix that > > > > Are you planning to post a fixed version of this patch or you just fix it > > internally? Would be good to have it posted to be able to ack it and other > > relevant patches. > looks like you missed it... I had posted updated patch [1] in this thread here > and I posted 29th patch as removal one [2] No, I didn't miss those, but as Sebastian pointed out and as I commented too, also that v2 version wasn't correct, so, a fixed v3 was needed. Consider this: In patch 1 you do: and then in a couple of places - return DMA_SUCCESS; + return DMA_COMPLETE; So, after that your patch dmaengine would be returning DMA_COMPLETE in case of success, i.e. 0. But all the DMAC and user drivers would still be checking for if (status != DMA_COMPLETE) { i.e. comparing status with 4 and thus detecting false errors, until your further 28 patches fix them. That's why, as Sebastian pointed out it was important to define DMA_COMPLETE and DMA_SUCCESS with the _same_ numerical value in your patch 1. > Both were pushed to -next after few days That's a pity, but I still don't see them in upstream -next, so, maybe it's still possible to fix? Thanks Guennadi --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 0bc7275..683c380 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h @@ -45,16 +45,17 @@ static inline int dma_submit_error(dma_cookie_t cookie) /** * enum dma_status - DMA transaction status - * @DMA_SUCCESS: transaction completed successfully + * @DMA_COMPLETE: transaction completed * @DMA_IN_PROGRESS: transaction not yet processed * @DMA_PAUSED: transaction is paused * @DMA_ERROR: transaction failed */ enum dma_status { - DMA_SUCCESS, + DMA_COMPLETE, DMA_IN_PROGRESS, DMA_PAUSED, DMA_ERROR, + DMA_SUCCESS, }; /**