Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1689923pxb; Thu, 16 Sep 2021 13:04:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZ2AHpakhKcA3DmwXpdBsiVBLkEbgOe0S5VhTFZ52BzRQPRKlNg49fInrOSkeh84G5Tqni X-Received: by 2002:a5e:c802:: with SMTP id y2mr5773814iol.162.1631822647047; Thu, 16 Sep 2021 13:04:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631822647; cv=none; d=google.com; s=arc-20160816; b=rkm7iA7Zo6Wo5JNc2I71yFemVwX9GpCSSIx+fuWJYJw/GV5dmfVwp0Ku9eH0Y4o6YD OAG11f921blKkftHPRYk1XTxicKso/b0GCFjXqUMLeqZKv90AlDJFIdh7N2bEwkx1/bD MfPgpyxkQlEWGi1QEZldI7vO1BukFi23aBpcMnir0s2LTqo6+oXuy2cDhLASZ23MH2PL Q/MDKJLa0TW6jl74uUKbUnWtTQSpKwTx12rxBgcXd9JIED906/n+VGZ9tkB+Q3M2zm1d 6eAqChxA9kO8SyETWx30+vUESybk/iubEPNTlkZbJo1q7yiA7vl6BvE1XSqL+FpaJM2k 3Z8g== 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=s3ZXmJF8+B6qw3rqjTPOsLPqkVgWf3SPqfiJifOqsfs=; b=iksEXsBoFGrHfsYl/BCaVNS+sb1vvubaOwJzfo2s6IGqJF98Dlizm0RVOWfuKWU8Nr i/RvkZcNEkgTCnNHDIznT+TMLQxtz9isv78wsA9/I8nwcqCMBNjwwKmfkJknMbwnB7uQ NRHMNHl7FYWqWZYP4D/FNLZk1/Ib0eXjFygh2qLw8u8C8hDhByx0Ur2DdclN5KGfCNIm jU0MuE5dTgtCv0T0hcZYAZgXFraBa5b1t+23WlVszaOHkv1Uxn2jSCNuV8JwB602X5Ij 9JegsMQGoYqhx+Xhi3Rsw6q6uZIwqaTwu9KIaRfkCiPsrxKo4H2aD6e2ROhyN04bASQJ VTVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ABwfg6XW; 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 l24si3026522jaf.107.2021.09.16.13.03.47; Thu, 16 Sep 2021 13:04:07 -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=ABwfg6XW; 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 S233356AbhIPQNJ (ORCPT + 99 others); Thu, 16 Sep 2021 12:13:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:47816 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233162AbhIPQHw (ORCPT ); Thu, 16 Sep 2021 12:07:52 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E42D86127B; Thu, 16 Sep 2021 16:06:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631808391; bh=c8vCPBh8/w1w+0Xm6+K/YNS+pIil4c1k3dHjk6dvAWI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ABwfg6XWmsPr469q9F7+NexKhuDmg97ywL1wKRxANj4u8+PSO/yvIrjzPHhn6auOX OtjY3Psir0E2dl0hiiqLz98x/7iPATtO+Zfx5Zpe2/deorHSDjaMZLNkH1zwX5Nf8G E62OuKe2r5aKR0PVierD/Y/VrA/wB99TwXvK4cPs= 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.10 041/306] Revert "dmaengine: imx-sdma: refine to load context only once" Date: Thu, 16 Sep 2021 17:56:26 +0200 Message-Id: <20210916155755.347766380@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155753.903069397@linuxfoundation.org> References: <20210916155753.903069397@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 @@ -379,7 +379,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; }; @@ -985,9 +984,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) @@ -1030,8 +1026,6 @@ static int sdma_load_context(struct sdma spin_unlock_irqrestore(&sdma->channel_0_lock, flags); - sdmac->context_loaded = true; - return ret; } @@ -1070,7 +1064,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) @@ -1338,7 +1331,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);