Received: by 2002:a05:6520:4d:b0:139:a872:a4c9 with SMTP id i13csp2564664lkm; Mon, 20 Sep 2021 18:50:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJysYr4e0sMT+OUSWcEdiTYFmXaA8oBN2/9wxp9aNPOzruxboyL+P71c7donU5L1rJW53K/V X-Received: by 2002:a05:6638:1389:: with SMTP id w9mr21586309jad.138.1632189029776; Mon, 20 Sep 2021 18:50:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632189029; cv=none; d=google.com; s=arc-20160816; b=CveRlccP5/G1DNnyGHwlIC9Wub2fCSwWGjeeocbXuvorqX5jBaeJrNCbEyEyLSCTCj GbBh+5DI8AlfEoPe+eN+LegXfJVxrZQjNMY5OIq9ZbQUzwD6/jRkLdh5hXp7r+zFQh3R GYyiu1wi+ybDtGLa5hD6Xy+ObcTFKagYvrxCB30E8/xphBSSVKWBzsMycFNSkRyrjn0f biLrWlMMIV38oSdBaoDi6zaWaa6tEIp/L9/aI+Y9dwtxzBNQmY2Gr7PurxOrxBE5Gek5 eGur5eHtB0s4QROKlS5qj4heKshzdzCeE7Cl+KcNBBufEoPNgsGnCMBkl2yFvQmHwc6u XMOQ== 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=Jmv09e41ZP73agYfn6GdWF3TssE/mDmLM2LcU07Jprk=; b=ZACjYx9O6H+pBiPKeZpULnSFQ5zYBFokvIvOCcG0SJtBySr9e6FNeQwbcG5x00TziB yk1wjBj/J6Kql0y3ITgCywvlOfTLN/BYAdUKreQOjdIioh2btRSO3zUdyVN6s/QLNfDZ s7lFWyRTmlAX9HXVeAi6L3wtjkUUDI6jjY7xrXeORWNqwr5T8caQRBW8sezyvK+qujQa wX/wCVegt3tZTx0IXanxpdKk+m3xR3Do+rvM0OxFVgCkmSuCTxNwcAKb4hNmTlj8kRkF nMPAUSRho6ZS/iQDOrhl2GB3MIJiJHshRyk/ygOs6uJJT3C0+fsUVuY0qrZ/D5j7Rwuq ZE8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="ARGi/iEg"; 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 e2si13732780jaa.68.2021.09.20.18.50.18; Mon, 20 Sep 2021 18:50:29 -0700 (PDT) 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="ARGi/iEg"; 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 S1358337AbhITSGQ (ORCPT + 99 others); Mon, 20 Sep 2021 14:06:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:56862 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350726AbhITSAn (ORCPT ); Mon, 20 Sep 2021 14:00:43 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A49B463223; Mon, 20 Sep 2021 17:15:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632158152; bh=6YvKqsPIQwe4JWDksOW/bfbv51cHkYaGvOZJOpAzwGo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ARGi/iEgNRfXkAvhCHDMpFATBBSd7WKAnKw5yo+OqIxp1Lq62sWD2DxGu1EZxVc1J G9rc7sM9xS1XL9EKYNCj58jAuDjvRhISSiLN3I85UQd6hPG+VkvAmd6P1wve1AY/Id /pn6yD+5F2jWAWu2hDmSWTapSBO4aod6sszW6p2k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Robin Gong , Sascha Hauer , Richard Leitner , Shawn Guo Subject: [PATCH 5.4 025/260] Revert "dmaengine: imx-sdma: refine to load context only once" Date: Mon, 20 Sep 2021 18:40:43 +0200 Message-Id: <20210920163931.983199204@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163931.123590023@linuxfoundation.org> References: <20210920163931.123590023@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: Robin Gong commit 8592f02464d52776c5cfae4627c6413b0ae7602d upstream. This reverts commit ad0d92d7ba6aecbe2705907c38ff8d8be4da1e9c, because in spi-imx case, burst length may be changed dynamically. Fixes: ad0d92d7ba6a ("dmaengine: imx-sdma: refine to load context only once") Cc: Signed-off-by: Robin Gong Acked-by: Sascha Hauer Tested-by: Richard Leitner Signed-off-by: Shawn Guo Signed-off-by: Greg Kroah-Hartman --- drivers/dma/imx-sdma.c | 8 -------- 1 file changed, 8 deletions(-) --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -377,7 +377,6 @@ struct sdma_channel { unsigned long watermark_level; u32 shp_addr, per_addr; enum dma_status status; - bool context_loaded; struct imx_dma_data data; struct work_struct terminate_worker; }; @@ -988,9 +987,6 @@ static int sdma_load_context(struct sdma int ret; unsigned long flags; - if (sdmac->context_loaded) - return 0; - if (sdmac->direction == DMA_DEV_TO_MEM) load_address = sdmac->pc_from_device; else if (sdmac->direction == DMA_DEV_TO_DEV) @@ -1033,8 +1029,6 @@ static int sdma_load_context(struct sdma spin_unlock_irqrestore(&sdma->channel_0_lock, flags); - sdmac->context_loaded = true; - return ret; } @@ -1074,7 +1068,6 @@ static void sdma_channel_terminate_work( sdmac->desc = NULL; spin_unlock_irqrestore(&sdmac->vc.lock, flags); vchan_dma_desc_free_list(&sdmac->vc, &head); - sdmac->context_loaded = false; } static int sdma_disable_channel_async(struct dma_chan *chan) @@ -1335,7 +1328,6 @@ static void sdma_free_chan_resources(str sdmac->event_id0 = 0; sdmac->event_id1 = 0; - sdmac->context_loaded = false; sdma_set_channel_priority(sdmac, 0);