From patchwork Wed Dec 15 11:01:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 12696251 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 E5454C433F5 for ; Wed, 15 Dec 2021 11:07:17 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6HZKj+EYI+w2a9P6xYMw9bbs3GIIhMKy4SYi9LDL6hU=; b=tDcupo1neqlNXq ejCWG6X+ovPDgN69oc1h3IFupyer4/VoWzvSTAz7NU1wcHl0TkIi/JRj47Fqkd0YKXEyxP8jAETKA jkK1St9Tb9Sog3bsOe5fxjoyYR4L9oprVK42+CJbiYp97nzjKcZ0klJ544KH7A7dkDATxXnJV+ga+ iEMbIETHWpcjISkh7pHt7vZOw6pwEVZizyxpGUE9akwxGbJEWRJvx2ynlA14gvQOaynSd9R95cLOk 37GHQULZ1RXxuGMCOh0rKsNv26bA/J53RnNGDwlJMeRjfdDw09zkYBbS2WDeY5cJH1J77/e/i4BUC oEOm0IoF5svhyf58G+Xg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxS6L-000OKZ-9C; Wed, 15 Dec 2021 11:05:37 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxS2G-000M9D-JC for linux-arm-kernel@lists.infradead.org; Wed, 15 Dec 2021 11:01:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1639566084; x=1671102084; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7qVcImxGBTHjFh5448/P7RQSE1s+vXFl/SCN0Q3y0cQ=; b=TP7heWgyQ3jxvC5IBc0No5hS/mmhzjgyGDbHJ1cwuWoLTsz2oI45Lwug V3xPC5qNosojcm2aIvmHaZQfUhBz5gPbmkR/Mc6wSmJAxN+nLfM+rmSPm hmnyTjeR5noFUwixPZhAP7c5cEcmf1ug96D5CoK/R5TWxYoj0eIu/3VXL oHOjVlArM7zur0kIL0SNBuWbdIKehwzhWalg2lC8J6dzKzPc4IqrY7O01 ybaa5xt0Aojsr0fQ1dKfJ5Y/LyAx8SJ3vrNKdKHK0XKRuIhO75JN6xTcf hJ8FW455bMJ4QWpjZOfGYEejNAR0scRHTxeQq5SjKgWTwNKAoWBpd8lg4 w==; IronPort-SDR: LZPjOc+QbtJc7YRYwDKlCAlUIbmb2qmil+NdK+LW2Kbr9NF/jT+M0HUal27EU+/fJoMiK7IdrA 9tNZPy1eTSgygCEsN2yfcnO4RPn56aCMyhpmIIDgICAWtA3riX5W4IvlqVCOn94yJyLh0EjXZL LZ2zKl/afmRwm6AVmBcWBlII4TqYe0+z28lYXz38FdFc+Tv5m4J2Ta+TuvZpYJ+uk16lhNSVaG 0Lze1GVFliVh/13fY5KHVhsijoZlKYkgDmMl4WE39dz/SweVvmirt22Oa1/msPJeQ4xrxJxhIh Ef/7RTQ3mHRlYNBsBzMDI663 X-IronPort-AV: E=Sophos;i="5.88,207,1635231600"; d="scan'208";a="147304259" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 15 Dec 2021 04:01:23 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Wed, 15 Dec 2021 04:01:22 -0700 Received: from ROB-ULT-M18064N.mchp-main.com (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Wed, 15 Dec 2021 04:01:20 -0700 From: Tudor Ambarus To: Subject: [PATCH v3 01/12] dmaengine: at_xdmac: Don't start transactions at tx_submit level Date: Wed, 15 Dec 2021 13:01:04 +0200 Message-ID: <20211215110115.191749-2-tudor.ambarus@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211215110115.191749-1-tudor.ambarus@microchip.com> References: <20211215110115.191749-1-tudor.ambarus@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211215_030124_698395_DE1B9DB3 X-CRM114-Status: UNSURE ( 8.84 ) X-CRM114-Notice: Please train this message. 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: , Cc: Tudor Ambarus , mripard@kernel.org, linux-kernel@vger.kernel.org, ludovic.desroches@microchip.com, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org tx_submit is supposed to push the current transaction descriptor to a pending queue, waiting for issue_pending() to be called. issue_pending() must start the transfer, not tx_submit(), thus remove at_xdmac_start_xfer() from at_xdmac_tx_submit(). Clients of at_xdmac that assume that tx_submit() starts the transfer must be updated and call dma_async_issue_pending() if they miss to call it (one example is atmel_serial). As the at_xdmac_start_xfer() is now called only from at_xdmac_advance_work() when !at_xdmac_chan_is_enabled(), the at_xdmac_chan_is_enabled() check is no longer needed in at_xdmac_start_xfer(), thus remove it. Fixes: e1f7c9eee707 ("dmaengine: at_xdmac: creation of the atmel eXtended DMA Controller driver") Signed-off-by: Tudor Ambarus --- drivers/dma/at_xdmac.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c index e42dede5b243..4ff12b083136 100644 --- a/drivers/dma/at_xdmac.c +++ b/drivers/dma/at_xdmac.c @@ -385,9 +385,6 @@ static void at_xdmac_start_xfer(struct at_xdmac_chan *atchan, dev_vdbg(chan2dev(&atchan->chan), "%s: desc 0x%p\n", __func__, first); - if (at_xdmac_chan_is_enabled(atchan)) - return; - /* Set transfer as active to not try to start it again. */ first->active_xfer = true; @@ -479,9 +476,6 @@ static dma_cookie_t at_xdmac_tx_submit(struct dma_async_tx_descriptor *tx) dev_vdbg(chan2dev(tx->chan), "%s: atchan 0x%p, add desc 0x%p to xfers_list\n", __func__, atchan, desc); list_add_tail(&desc->xfer_node, &atchan->xfers_list); - if (list_is_singular(&atchan->xfers_list)) - at_xdmac_start_xfer(atchan, desc); - spin_unlock_irqrestore(&atchan->lock, irqflags); return cookie; }