From patchwork Tue Sep 8 15:25:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 249300 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp4691903ilg; Tue, 8 Sep 2020 09:09:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwCBXO/psY9587xl2ilhqxPrNggvLF5qt3zfj32ZIx25n70o/4SRXkuAuOIQDOjMJRpHAqj X-Received: by 2002:a17:906:d8cd:: with SMTP id re13mr26043457ejb.140.1599581361147; Tue, 08 Sep 2020 09:09:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599581361; cv=none; d=google.com; s=arc-20160816; b=RrynhKAi7E3/fyFeLg4PNaKAApwqFRmmwkEqb6nyf6lIewPvX1NQ3+y1PEr14ksmKF wdd62TAS6Vq1MQMoJ2ycZAC543FcC3M3YPTc8I/7TtWSjbKDkhWR84WRKIy3+gVK5zlA LY+6PnzZPn4u1WOhhH9EirqjRleQDss/wM9qO6hN/6Db7xl2M4x1vOkqOvgeycmK8MtD 76/+J2UPGYWDiYUHVZ1CaT7eHKOmnqhELBh9LKSwV9N2luAczrgQ8MA7DNO1l6egahvn fg8XXgL2GNK3/ywJsAfNHGyPftFt8jugNdQksvc80PVXtld0t/OXQeuprvuDuzFc2Lc4 LtFg== 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=QHHNiw5Y/xQFSAEw5+l3knQBUtmSEVkovwQbEzyPzlc=; b=RZLvXnIRa5B2fBErjW+iykI221WRwQXpL8ehkdd2vrFsYTlR0Sh9gu8KsqMdjYZxbE z2+l7jAgdejOfFiQ4cPTKP7QMFWzDdGV775/mjMHpDUO5nFeu86lKzr4A4EywrEAcIhu HkUBJ/3reHAz7zTYBvbQ2qV2oNoyFvWyGTGYUPZRtydOZLmzYf1qnSIJCcG7lItVfFn6 IcVs0UYlVXm4TbNR7yVU0xmlQQlTe+L/be7T+acBK7FVyRuHDgQO2S9jxzgDoFnfuiDC Mc6k13LZObGS51QCNvt/TULERh/a/mORnL77gWqUWb1P9dHMVWxbokvLBkLI3mLqt4/9 Sdrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kw2PDSM9; 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 u17si818803edr.266.2020.09.08.09.09.20; Tue, 08 Sep 2020 09:09:21 -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=kw2PDSM9; 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 S1731353AbgIHQJR (ORCPT + 15 others); Tue, 8 Sep 2020 12:09:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:55024 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731326AbgIHQJA (ORCPT ); Tue, 8 Sep 2020 12:09:00 -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 59F292404C; Tue, 8 Sep 2020 15:48:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599580093; bh=Jhn6tsgXt3uDCSv/y/lcHKqsyitqFv95Y1a/+DZ85ME=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kw2PDSM9M/kqd+ev3nAUMO6/FcOOgvF7+/ubHVtlbOKNNmddekUUHoOJvhu7MYc+r AGNAd7DiNOavGxBdv+rTFWYWwXPA0r9QgDlIkvHySwzvy31WF0rKbF6SJB/0Q1D3BA Yy1WUxQK+maqHfAYNBG7UgbwOb9XfDlZPQo2XnAY= 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.19 29/88] dmaengine: pl330: Fix burst length if burst size is smaller than bus width Date: Tue, 8 Sep 2020 17:25:30 +0200 Message-Id: <20200908152222.532997810@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200908152221.082184905@linuxfoundation.org> References: <20200908152221.082184905@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 bc8050c025b7b..c564df713efc3 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -2769,6 +2769,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. @@ -2776,7 +2777,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;