From patchwork Fri Sep 11 12:45:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 249732 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp81125ilk; Fri, 11 Sep 2020 10:36:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzFsIldomlpW/xpmuLuqZ2+vdaE4pDhq7QDEKxesOLTz4RWXbS9Hekgkual4QCKsMyeUuoL X-Received: by 2002:a50:fa88:: with SMTP id w8mr3367954edr.179.1599845764909; Fri, 11 Sep 2020 10:36:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599845764; cv=none; d=google.com; s=arc-20160816; b=vK8WmV72pviUZw/db0a/jKM7cbu2dx0DACBU3C6AUciB3xMe+wWHmzOa93Ji9UOVUl krLI0l23mYIdAaHWiWwXQvTEhqsD3nAKs2aSXu+L5j2DoABut16e+mU8Uj+8ZBsfO35u C3xNUG9ipOcKqUdqyPSSKhHLNPegTn8ST5h0cjpcGRJP6cSJRmEnqutlZzh6d6r3zGru eyo9Ddhjrak7bJKR+UDxZ6FJX1IpZHAnZH1VZUQqMTE6krWYDv+LzNR6oAkB3NuEGf0M dT0DgJneYCWQT5bYAusytA6yYJcsiZNj68gtse90Jbz7bgSsgmutwA4G3Iv4ovfx/Udg cLXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=pbaA6tky+/tNCqREJwHKvQWSx81zWMuGI4tQOQAPf9A=; b=hl2h6x8ifj/1V+rtIPJfWnMuKbyRz0mcf13yC/qHWdQhfWWmGNq4X6TyQckifFD8y/ 2pjt55dusGYZGwcADNSdsEFz4EV5yfLG7fquTuF4b5cX7AJ2Ni+0YpavkxlRmKjA2l2S QRCcbzdhWuXe2vJP1Xil/bVjgq2CocKirCqbJgGEYYqfGZn4KAM4BYug2UcwQi80Sr6S C0Gddv6YwN2UfhgDQu0GbceXVtaTmsGpkf69T7cU0UGxyZxkUqlxrT/Ajcrq6ZIOl4MC /NjqsdMoqF4mSsKloUS9wVz34oOzramZWTHHtCKVe2tOz7ldyNfaUpAx/iekZSiQVLR7 5mug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Dp1LDyVi; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (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 do18si1858421ejc.13.2020.09.11.10.36.04; Fri, 11 Sep 2020 10:36:04 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-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=@kernel.org header.s=default header.b=Dp1LDyVi; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726133AbgIKRgC (ORCPT + 15 others); Fri, 11 Sep 2020 13:36:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:48796 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725997AbgIKMxu (ORCPT ); Fri, 11 Sep 2020 08:53:50 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1B3AF22208; Fri, 11 Sep 2020 12:53:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599828808; bh=g0zJtYnnfddzXvQnXj1hdkbR8XKhy5A5v7rFK/bguOo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Dp1LDyVi9/O3CpowSM6ITCak1x0TYgS8UnIUyEYa6Fd3fMVmxyWU3Bd2ZJaty9SP4 MTwNkQwoIQil4i19AcATV0BCEsXZyfb01yiG59uCYGT6W6LK4kVBO6hZmbMbX6azWp IbtYhrBzQ5SJ0nEd04zaJzi9lx0tTgckXjR8gvi8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kernel test robot , Marek Szyprowski , Vinod Koul , Sasha Levin Subject: [PATCH 4.4 15/62] dmaengine: pl330: Fix burst length if burst size is smaller than bus width Date: Fri, 11 Sep 2020 14:45:58 +0200 Message-Id: <20200911122503.149221163@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200911122502.395450276@linuxfoundation.org> References: <20200911122502.395450276@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Marek Szyprowski [ Upstream commit 0661cef675d37e2c4b66a996389ebeae8568e49e ] Move the burst len fixup after setting the generic value for it. This finally enables the fixup introduced by commit 137bd11090d8 ("dmaengine: pl330: Align DMA memcpy operations to MFIFO width"), which otherwise was overwritten by the generic value. Reported-by: kernel test robot Fixes: 137bd11090d8 ("dmaengine: pl330: Align DMA memcpy operations to MFIFO width") Signed-off-by: Marek Szyprowski Link: https://lore.kernel.org/r/20200825064617.16193-1-m.szyprowski@samsung.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/dma/pl330.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.25.1 diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 799c182c3eacc..9aa57b37381a9 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -2629,6 +2629,7 @@ pl330_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dst, while (burst != (1 << desc->rqcfg.brst_size)) desc->rqcfg.brst_size++; + desc->rqcfg.brst_len = get_burst_len(desc, len); /* * If burst size is smaller than bus width then make sure we only * transfer one at a time to avoid a burst stradling an MFIFO entry. @@ -2636,7 +2637,6 @@ pl330_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dst, if (desc->rqcfg.brst_size * 8 < pl330->pcfg.data_bus_width) desc->rqcfg.brst_len = 1; - desc->rqcfg.brst_len = get_burst_len(desc, len); desc->bytes_requested = len; desc->txd.flags = flags;