From patchwork Tue Sep 8 15:26:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 249310 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp4769900ilg; Tue, 8 Sep 2020 10:58:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwFB17DBXJBPEMYLeZVooLYghrw92ZCysRa79rIGyVlWyB6f4oS3EY9hU4JxHtMvp1SPUDQ X-Received: by 2002:a17:906:2b87:: with SMTP id m7mr26912194ejg.210.1599587929814; Tue, 08 Sep 2020 10:58:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599587929; cv=none; d=google.com; s=arc-20160816; b=I+WwDuAdkE3YTzDKiWTN0yF8WfMXqNRCTOhZwd6I068ohKNFkWYSSKZFrg6XDVilSp S9Cz/gWJyAzs+VV19oS2RaebLn37DcUHdf1ZNQlbnBJahlUdkpiWF0usFK89mZkmiQ2v uacsW3zOc3MIjnkS68AXZRUFwlv/Zk3ml71XDUhYh75drhhqv+hNQQLGeA0p14IFqGyb iDvQSY8d6uLjPtjRyWz0gHVaIqm6Yg4zXUzSHD2I0ur4c09/RPLewo3iE6bYyUyxb2nB F4rkZC3jo1Ds91eqepN3O6ZZ+D8awKtgS0DkHC0w9heVkf1XEIfS0F/SCBwLrHP3ho6d OzlQ== 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=xQSXUDHg3O8P08BdblKefppv50kutJj3uisAdEWHKK4=; b=s8R9bYnMWrhfENO7L+6XuR3LZx8QqXYv+AVrPg2RXlZcLFdyWWtRuZJdKHLp9XqdkU ZKCdyi+UBZh8YxfP1pK+KmaIsodqpEHTSdtd2Rs3k34ogN9neQs27YhkG/e9k69uQI9i zaSkdOPmi3Ya55BrldUg15H0GpF7trD1TDuThezNTj2OE+LSM1vQ45y6813LothX1I8C nyKIEkknnhs9aZ2ikeGYI9JFYXCYXT6Dh69da3eUgT5+xQ7KopqTMbkffjk8h506NWY9 rmcJCaUq/xXj9Ol/mvQF2/OhRb4NnyHHwZZDybRFlosCZXksmEOAQBrpFXNPTHpxQwZV TGww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=K3xrn7TC; 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 de17si12289424edb.89.2020.09.08.10.58.49; Tue, 08 Sep 2020 10:58:49 -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=K3xrn7TC; 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 S1732256AbgIHR6r (ORCPT + 15 others); Tue, 8 Sep 2020 13:58:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:56678 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731557AbgIHQMq (ORCPT ); Tue, 8 Sep 2020 12:12:46 -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 23BA82485D; Tue, 8 Sep 2020 15:51:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599580310; bh=cP9XYioJCPp9nOq/Ys2DUSiCkzI31mn9ReHaf80goV0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K3xrn7TCe3sYfGfVD8MYGG0+SYboEoe2Hr3KFUgxs7R33qpI1t6U12wd3KJ1a9fk8 SHo62pjQrdp285D0bmyvawwqCLxyDmD+MzMl1FTeTfu8tFENm3RDps83P/gv1/+SLX BQoSeDN5pGcdBNjLkXu0F4ePaPgYezvOxkhI/6fg= 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.14 25/65] dmaengine: pl330: Fix burst length if burst size is smaller than bus width Date: Tue, 8 Sep 2020 17:26:10 +0200 Message-Id: <20200908152218.336620630@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200908152217.022816723@linuxfoundation.org> References: <20200908152217.022816723@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 b4fa555a243f9..ff8b7042d28f4 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -2661,6 +2661,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. @@ -2668,7 +2669,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;