From patchwork Tue Feb 15 04:41:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vignesh Raghavendra X-Patchwork-Id: 12746498 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 6B67AC433EF for ; Tue, 15 Feb 2022 04:43:23 +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:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=lksB0z+LONiJ+uv3qYQP4W7tcKm++EPDqkRKpd9vXMw=; b=UwQzUdEZEit4PH dOihkgwzGp8tFkXANOfBIlyHlMKnwpLSGiEe5Q+wRiMW/Z43dn1C0qW3+3F1r/lO0XMBOc49ZfN0b 8QZX1+wbEyHKiAnpZcBRZsAnqlo/V8GGD/Ts0tXvJuQNv+leVQbSPJU/I7C5RR0n9twsWTthxeuQB 4zbNZxHJvl9hmnBWWSVaFA8Zy7sAL+AH6OluThGyjq97yykg9uHBr/I6eyFrXAoVv1PpKDQSfW8or 7Rblo0m0F6RWW+WUKMVRzWTrAxcNaoHLW5whJDZMoCmA0bTEnG1Ed1I6QB42s8q8ZVzdr48qu+SVh rClCc3M+Cv2okLSvmkAg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJpel-000DI0-Vp; Tue, 15 Feb 2022 04:41:40 +0000 Received: from lelv0142.ext.ti.com ([198.47.23.249]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJpei-000DHe-Mm for linux-arm-kernel@lists.infradead.org; Tue, 15 Feb 2022 04:41:38 +0000 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 21F4fOjr014078; Mon, 14 Feb 2022 22:41:24 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1644900084; bh=cscbZ7Of7ik0JUdp5AueLUkwQVQnWzMfZa+oyDa8h8A=; h=From:To:CC:Subject:Date; b=fn9+ldedesTOkifeGM/4B8fVG8Q7JrKyjl/I+Mb9yA9Ilq1ow5dYKFdC7nyjA+V8b SQIoT0wVy4FIo7E5w9WKD5gvIcC1/nOiTTFF8VBJWNJAuQ/wTW7TAN/bCLviWnmTqN 7NpMdfjelY1ExBzdtHcF1YtHEny1ncZvMBuuuNpQ= Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 21F4fOvx085770 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 14 Feb 2022 22:41:24 -0600 Received: from DLEE101.ent.ti.com (157.170.170.31) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Mon, 14 Feb 2022 22:41:24 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14 via Frontend Transport; Mon, 14 Feb 2022 22:41:24 -0600 Received: from ula0132425.ent.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 21F4fLtI130239; Mon, 14 Feb 2022 22:41:22 -0600 From: Vignesh Raghavendra To: Peter Ujfalusi , Vinod Koul CC: , , Vignesh Raghavendra , Linux ARM Mailing List Subject: [PATCH] dmaengine: ti: k3-udma: Avoid false error msg on chan teardown Date: Tue, 15 Feb 2022 10:11:12 +0530 Message-ID: <20220215044112.161634-1-vigneshr@ti.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220214_204136_874725_07C56377 X-CRM114-Status: GOOD ( 10.15 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org In cyclic mode, there is no additional descriptor pushed to collect outstanding data on channel teardown. Therefore no need to wait for this descriptor to come back. Without this terminating aplay cmd outputs false error msg like: [ 116.402800] ti-bcdma 485c0100.dma-controller: chan1 teardown timeout! Signed-off-by: Vignesh Raghavendra --- drivers/dma/ti/k3-udma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c index 9abb08d353ca0..c9a1b2f312603 100644 --- a/drivers/dma/ti/k3-udma.c +++ b/drivers/dma/ti/k3-udma.c @@ -3924,7 +3924,7 @@ static void udma_synchronize(struct dma_chan *chan) vchan_synchronize(&uc->vc); - if (uc->state == UDMA_CHAN_IS_TERMINATING) { + if (uc->state == UDMA_CHAN_IS_TERMINATING && !uc->cyclic) { timeout = wait_for_completion_timeout(&uc->teardown_completed, timeout); if (!timeout) {