From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 299A1CE7B1A for ; Thu, 28 Sep 2023 10:55:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fkiNcRwzuBXMkpnuNfW1aKRoujiHIhZIjl2Ls0dl8hE=; b=ZtIU2Edbc1RsvV 5dpIxEPgHe7fQIL3TBrhKcO6SUostCpH/WoOi3b+xNjWiaurcUXmpzVgds3UNxZtCi/KRIkJSN4Ht 4V+Qzf2drcGhU0VR0/TevIBnx/xy64JQw+OP3lRRLoec+qNWD2bsWFSch0etD181yNAlVOInJdpl7 W+w68KktqFPLjn2LgWvJrvvDP7UEepYA3OFydygQPoWVcQJd0WVpT4zogbPqk9dWOrcJzwuZwPWbR LsSFRIQ8e7z4ccFQTrE7RxxowRQw8H6e1cszy8TO+OQm++DrAuKWRCIcj1RBlzqhMRTQQnAiDQBaP pg6Sm5GLvF1GQZY2OPtA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlofK-002ye8-22; Thu, 28 Sep 2023 10:54:42 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlofF-002ybx-30 for linux-arm-kernel@lists.infradead.org; Thu, 28 Sep 2023 10:54:39 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 8560ACE1C37; Thu, 28 Sep 2023 10:54:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 59EADC433C8; Thu, 28 Sep 2023 10:54:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695898474; bh=uYkzoSuk+8k840ZzRDVFN9ZAHdxAYvdbGmTtbbj7LLA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cejLGD5IofYWcTWrU92hf13DVSd0GXPcTMDzIFPr8oP4I0hC+QCmHLfigHBtUt30A eFTpQdTn62x6xLgvw6518mnRkzht82J/mFMDn/NYkn0lk9BnFoUDYqlAR829TjCEoc hv8SZrMMgcaxx+XzNfGTcCQ4AaSfxnwX1Vk6FO6kqaU1A7/0OZafPzLGsP0dRYN+a/ qapxhUOQR/SD6jQqlFXoHE1LjN3BEbeN7OBLrwF1hZ0Ln3/wkGsitPLOgeqN9bbHIi y+eC0f2+iEES04x+mhoGhyQpPdEylr2icwdi+DKmuLTJTYjxAtS99JRDXP9vwXSbmO S24cyy8IvzCYg== Date: Thu, 28 Sep 2023 16:24:31 +0530 From: Vinod Koul To: Miquel Raynal Cc: Lizhi Hou , Brian Xu , Raj Kumar Rampelli , Michal Simek , dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Thomas Petazzoni , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/2] dmaengine: xilinx: xdma: Support cyclic transfers Message-ID: References: <20230922162056.594933-1-miquel.raynal@bootlin.com> <20230922162056.594933-3-miquel.raynal@bootlin.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230922162056.594933-3-miquel.raynal@bootlin.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230928_035438_200939_53EE2CE5 X-CRM114-Status: GOOD ( 11.32 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 22-09-23, 18:20, Miquel Raynal wrote: > @@ -583,7 +690,36 @@ static int xdma_alloc_chan_resources(struct dma_chan *chan) > static enum dma_status xdma_tx_status(struct dma_chan *chan, dma_cookie_t cookie, > struct dma_tx_state *state) > { > - return dma_cookie_status(chan, cookie, state); > + struct xdma_chan *xdma_chan = to_xdma_chan(chan); > + struct xdma_desc *desc = NULL; > + struct virt_dma_desc *vd; > + enum dma_status ret; > + unsigned long flags; > + unsigned int period_idx; > + u32 residue = 0; > + > + ret = dma_cookie_status(chan, cookie, state); > + if (ret == DMA_COMPLETE) > + return ret; > + > + spin_lock_irqsave(&xdma_chan->vchan.lock, flags); > + > + vd = vchan_find_desc(&xdma_chan->vchan, cookie); > + if (vd) > + desc = to_xdma_desc(vd); vd is not used in below check, so should be done after below checks, why do this for cyclic case? Otherwise series lgtm, just fix the error reported by test bot > + if (!desc || !desc->cyclic) { > + spin_unlock_irqrestore(&xdma_chan->vchan.lock, flags); > + return ret; > + } -- ~Vinod _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel