Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3595934pxb; Mon, 24 Jan 2022 13:07:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJzm8u63b3My3JbOtjBZmT/hYU3j18VtAVKNzSi4SSwt7x0M7K1BHIK1AMGzL1GjaQ8nFg30 X-Received: by 2002:a05:6a00:148c:b0:4c2:6f06:8c70 with SMTP id v12-20020a056a00148c00b004c26f068c70mr15790379pfu.48.1643058435021; Mon, 24 Jan 2022 13:07:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643058434; cv=none; d=google.com; s=arc-20160816; b=RqFaQb28tXrSV3sPHTw0VFS7LxyYlrH1YyRHDTCpNCugFINbVXNQDhkgoMyH7/rIOT KRYdsF4d4Ei4Dnjhex6CSU/mS2P4Q2I/S8HHSH0p5kyv5zY25h7dQEir0ProzUi+T6+F hLKzlpRrxOwJmmUuyYgcXu4PQdqPIgfUeSr2m3X0zV5QXuV3Grct/NrwdkPCtPlXRK8P JnbfY5j6WhZXPy/lv9lnKmY8a1WBfV1IuuzHgbqfLLFvcwhP0FE3plnMN5JrwOoMA5Uy VgdWRGwRjX4uNSX0nvTo+UIYvbGwlQyGZ53r3pxmG2N3oruduziefE/KX5DUq/j0wKXO 5Bjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=xm3yLZLaqC9iAheFj//t640H7xfovRz4WGNNsqEJzC4=; b=z1/ctd3kxauXJ/E7EsBxm22yqEIHBifUR8dpgi6qVB9nzlcd9Lj2wC3Oactbfwcfzt fVER6w4lWPgLSlFLAwW+gzWZJVtANUBQFeE4/W9+RPQh9ZQyWzGtsMZLyJKR38AOwuV6 eZ3AOelZwSQDEMidYcMTSwJC9LXXgaFIJr9FaQQzDxeoIc/S48d4S7v+nnpW97j4JV9P KlFOOZYWSMzptgHaczrPuztKD9cGSk7ao7QynTxSi0U7i1XP2UvtJiNqwn4jNdt7lR+c U7jiPjPH1QkkFk7M/ba0bZ9tyiUYZMac3z5jo9vyUuD3FcI7JtavpGd8kB2mp6Gxm9Fy +Dog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=f1CQ9nu6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b3si8917662plh.40.2022.01.24.13.07.01; Mon, 24 Jan 2022 13:07:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=f1CQ9nu6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350387AbiAXUcG (ORCPT + 99 others); Mon, 24 Jan 2022 15:32:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355393AbiAXUNh (ORCPT ); Mon, 24 Jan 2022 15:13:37 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2A25C061354; Mon, 24 Jan 2022 11:11:15 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 8F45AB81236; Mon, 24 Jan 2022 19:11:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A22BCC340E5; Mon, 24 Jan 2022 19:11:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643051473; bh=/wufMqX4nHb3ttYgY9ynSmxAtApyX6khtVhKyV0tUd8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f1CQ9nu6rs7etiNR6Ghordt3j+3hlWfPKBE0FYeWl5k5cLb/xamywP6csbF5iBGWz sD9ZMCkn5atCnztQNu2RFeWtrswOYFEiUsLWu3xE2a2NMvR39a7oyKZZ9hzQNcUXiC 1FxbM/ICzy5R+5zK24O9s1JOVGtgAjCnu7WQG4QA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tudor Ambarus , Vinod Koul Subject: [PATCH 4.14 172/186] dmaengine: at_xdmac: Dont start transactions at tx_submit level Date: Mon, 24 Jan 2022 19:44:07 +0100 Message-Id: <20220124183942.646167534@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183937.101330125@linuxfoundation.org> References: <20220124183937.101330125@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tudor Ambarus commit bccfb96b59179d4f96cbbd1ddff8fac6d335eae4 upstream. 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 Link: https://lore.kernel.org/r/20211215110115.191749-2-tudor.ambarus@microchip.com Signed-off-by: Vinod Koul Signed-off-by: Greg Kroah-Hartman --- drivers/dma/at_xdmac.c | 6 ------ 1 file changed, 6 deletions(-) --- a/drivers/dma/at_xdmac.c +++ b/drivers/dma/at_xdmac.c @@ -344,9 +344,6 @@ static void at_xdmac_start_xfer(struct a 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; @@ -430,9 +427,6 @@ static dma_cookie_t at_xdmac_tx_submit(s 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; }