Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1913871pxb; Thu, 16 Sep 2021 20:05:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMkilZTjpVHK59IhJZGhm8EBcZFFgyzA4ZrtpQXWIhkr/Il1OMQmvzeQRwmh9w/Vjmyp8J X-Received: by 2002:a17:906:7250:: with SMTP id n16mr9620850ejk.147.1631847941280; Thu, 16 Sep 2021 20:05:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631847941; cv=none; d=google.com; s=arc-20160816; b=0Ng7iDgchYNjIF/TEfs3hNBKAJ2vhluTemjPRT1nwijbMM/fXTpLWAgQ1w2iRDnSVQ k/nJznJh8siyZFLmM8AduJO94iKRjNn7iCDTvGsnp9Zml7WYV7KGRWt9Lsdqqw6qBcSH BWra08MDxdkzuZoHKT82vEBPqDsEdsjyhIdkwtnWt4/AXdbMFxL8C/rpcUcokShaeOnN Ycud+e7xcN2tggANgLJyTV6wEUcG0FzXkPROojTO6AA6cYNsB9uSJqM+PcQnaRjnXevH hNCDB74DACNhu+Vb6GJNT7CwTWuD4C08Wpfp0mq/zdASCnpzXwufyB6V8Y9KSXa54CqH 45BQ== 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=MbbOXsrXWxMKOOF/ZqSjo6XsjjS/7w2/hk6HMZMPSVc=; b=gQxlbfK8W5Ff5qJiN+7cn4Ba5zxqCogUOo4KCO2N0B0bgP0+HK8vVPUe5ZUGxqDhiE lCyRfiWTXv6g4rgHP45ffejKsd1PP5jomEmurmWf3Uz/E7NRSTfl585SBRjNbfOye4hz RF/62c3omx13ufZVO7OTGSvksZmSC0Iy/AT/GXmpUQWdGbSAqdTKfJdGT4ZRh7W0RTyA iYM5b36pXkvErvK/zkkr9q/NBPpBlxfOJmNb2XZNsWGgdo2S5otjgGgPODzaRmBKDRwR CZAhQYIRqXpvklLbGVdFCJeRZ17s84Zr6lARJkK07rwyyzQOTkizonc6ebPsUK+s8xxe mfzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RUTQyCcR; 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 eb13si7387871edb.3.2021.09.16.20.05.17; Thu, 16 Sep 2021 20:05:41 -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=RUTQyCcR; 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 S1352108AbhIPRUg (ORCPT + 99 others); Thu, 16 Sep 2021 13:20:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:40896 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244120AbhIPRNO (ORCPT ); Thu, 16 Sep 2021 13:13:14 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 21FEB619EE; Thu, 16 Sep 2021 16:38:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631810322; bh=7IKxQif8u3AyVsV6EqfXAMHmliAOQErBW2eda/5VC70=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RUTQyCcRILs0RwLjsVIGysCaEVypu+TRazOlY1Zp/KiIrF585wWWgVvbeqX7KmlZb 1OxGVkA1H1r0tUy6mq46xNVverBvdRNnqhRH/IB/8Ra0I46gBDClcOExhaNwcewYAk 4HlnUhA+hJVfmVtSXFZSeb5eNXIGmWDCLwn8qy+A= 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.14 056/432] Revert "dmaengine: imx-sdma: refine to load context only once" Date: Thu, 16 Sep 2021 17:56:45 +0200 Message-Id: <20210916155812.694943734@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155810.813340753@linuxfoundation.org> References: <20210916155810.813340753@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 @@ -433,7 +433,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; }; @@ -1008,9 +1007,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) @@ -1053,8 +1049,6 @@ static int sdma_load_context(struct sdma spin_unlock_irqrestore(&sdma->channel_0_lock, flags); - sdmac->context_loaded = true; - return ret; } @@ -1093,7 +1087,6 @@ static void sdma_channel_terminate_work( vchan_get_all_descriptors(&sdmac->vc, &head); spin_unlock_irqrestore(&sdmac->vc.lock, flags); vchan_dma_desc_free_list(&sdmac->vc, &head); - sdmac->context_loaded = false; } static int sdma_terminate_all(struct dma_chan *chan) @@ -1361,7 +1354,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);