Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3667433pxb; Mon, 24 Jan 2022 14:53:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJxu7NV5w6SbbEB45PHWXa/y2yVOuHehuNirwvdViMEm0jfVX72BpSV0lFV9Iv6ZTnlSfr6j X-Received: by 2002:a17:902:6e08:b0:14b:61:b1ad with SMTP id u8-20020a1709026e0800b0014b0061b1admr16397034plk.107.1643064832923; Mon, 24 Jan 2022 14:53:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643064832; cv=none; d=google.com; s=arc-20160816; b=FMmhLVREPMoC9Dy/MC03V1WB9KpBDXl23X2xc7hD5aiZlsHOdSlT8Z1uZ/efKRMbt0 lC+WjW/Kxc2OLSaUO2h9vGHKOdE2VeYzlVXf8ZyUS/BsGvTtHqEk408sr3Bwo3OMmJhI fUJnQa5t/uehvI1rJFQ3ajxM93acbY6fMnsYm07yjZ1NkjWGrBBhxS+NvULrJMX34zN0 aeR4bMEo9oCyJ4rke7uKC2ak20ZOWNh0Dk614M598Wh1TXDiBCJEZrentunHEa+Hw8+I JF3JtGrpad6L4zGP+ZT6I/qb1u4ft3rhUG9R8cuf9TafbKjThEWN5EAU0N1tNORsviQb sU6g== 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=KGnw0M94dJm4ChtDsbtc3FP9W425EaHEM5Z33JuGfSM=; b=aDJr0DziiTA+cRWUcmGA1O+vg2uecBaMUtIQG7DcSFVbBPBK2UNDUSvLPpzTxGg560 8mQwpyeKI4Ofi1UMEAA2VFtR6sE936Eu/WFakoKtAVfkyZQNyWlVaMVEjvRt4dVef15q dnSlBvfKSHvxGvREKGSqBr6bPgwpRL7WH9u2CTORq5LirjNf4380r0XbLyP1Ze/VrYG4 DyNZDIya6XZTl5en1y7ZJK3v0Nlf32T4jSwllZYkJpSj/oou6MZvZuebpHC+N9l+v0CL WaPC8VEjXZrNIMOzxSiFfh5dB+hf3l6l3zOd//CZbk3xZRQMFjpLMM2GBbkLTI5MfmZX kKGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vFAg8qex; 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 lp18si603895pjb.165.2022.01.24.14.53.41; Mon, 24 Jan 2022 14:53:52 -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=vFAg8qex; 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 S1838815AbiAXWsp (ORCPT + 99 others); Mon, 24 Jan 2022 17:48:45 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:52686 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345225AbiAXVnB (ORCPT ); Mon, 24 Jan 2022 16:43:01 -0500 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 402C2B80FA1; Mon, 24 Jan 2022 21:42:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E8C4FC340E4; Mon, 24 Jan 2022 21:42:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643060578; bh=OdssgiM79/9ocsj19OPaOx7QxpE2D+RAnAHhWTYflIM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vFAg8qexBYg1kyaVcoiWRnbhWV9zu0r6/XZnFTd63uF2h8lVH2v3C681B3XO2Gtyl dUbiArOrFsc+NL4H2/FRlayT0QqLf6Cr8Wt58P96Tq6QuGICOLdrXoYJPc2JmjsTue upQE2QA2aqBi0YyE9thlrsacQzfWtHWmaEaXmmks= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tudor Ambarus , Vinod Koul Subject: [PATCH 5.16 0994/1039] dmaengine: at_xdmac: Dont start transactions at tx_submit level Date: Mon, 24 Jan 2022 19:46:23 +0100 Message-Id: <20220124184158.705229643@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@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 @@ -385,9 +385,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; @@ -479,9 +476,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; }