Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp777881ybb; Wed, 1 Apr 2020 09:26:17 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvj/RPBAV5XRRa+gIEDB7lzLsbHoMIRZjwr5cUJ/XbagupY1TmKsY4ULQCLJPaNjqsxRL2m X-Received: by 2002:a9d:7f05:: with SMTP id j5mr17992312otq.312.1585758377450; Wed, 01 Apr 2020 09:26:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585758377; cv=none; d=google.com; s=arc-20160816; b=BAaUiZbGVKB5QJMdgVvm+/MYURmHlKH1JxeXCqMPW4YTIhZTAkh1JVvKhsCzsd8Few ib7wO6sH2TBUqG5aHVZVyqzYyQPE3EmeYRtxTu9Osdsx+jBVTpFUJGdsE75BO2YRR80z HjevIVqPkpVnuzuZFk0+f+doS6DTs3+TZsAJRoSrfPXSK7UxOvcqzoPB/IeIJZdX3GaX a6YWUbMydHKpDiFvRzqtLSuo/ohNsrLKsniuWjEW2n+7gEfsvKd3yQMRnDx/L1k8ScoW lod/wgLB8CAiPxxBUq5maAzR+3ZYm6NqfWNvKr4Hjn7LrSFzFRk5gphUPJ7iYkp9xhbA if2g== 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=19oyH1+bVTew1DFfqXfXh3V2SsHUhseQn3OQ5fs5XAM=; b=NrpuQWoSW7Zd3lO2joFSBpWGVbJSClMENfztamoLQItm2fxU8c55Ucy8LnJUMzRNak M1vvYlVwfUVLC1cz8tJ/hAxEN6L1Gff5cXCtvi6PUyz+O88doialKhHmi2XFv02DZt0w EA00seom6hx60OuvGUGgTJyZZAc3EifQ41ZZiD3YPoyg2/oBuIlQjLhFMLpYL5U5wzwI SH+0MCLarhB6lZmT0TGYowFGWEC4QoJyWpWqqZ3U+uw/+hF4aDvPzsz8n/h2L/DiMv2v v3M5WXhgzJ6exQ1EfOo31uXgml/mAoffwTu4Dwt8AN2FzU29OL1dHN3sGxoh4KZqTuvs kdNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pOMiO7AP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i6si1109791oik.72.2020.04.01.09.26.04; Wed, 01 Apr 2020 09:26:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pOMiO7AP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387756AbgDAQY6 (ORCPT + 99 others); Wed, 1 Apr 2020 12:24:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:48770 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387553AbgDAQY4 (ORCPT ); Wed, 1 Apr 2020 12:24:56 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 B142F212CC; Wed, 1 Apr 2020 16:24:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585758295; bh=QaVZu7oeE9kvody+R9vApzpKSF+e7ayYBfps5bhprrE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pOMiO7AP0P83MfhZ9W6H9cWIAxNxXJYxtXGSHw2kCbuGqlh74tvx3glZqK629K2ET PxOV9Th/leGbUjMOMp3kgT4zCVdOhxjZjt0sqI4of7hU+iFXvqsKEk6UK9SI2vxkKu zZTfsGqQbxUXlvViFy7CXLn4sBl4wn0nf8lHOBFc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Madalin Bucur , "David S. Miller" , Sasha Levin Subject: [PATCH 4.19 038/116] dt-bindings: net: FMan erratum A050385 Date: Wed, 1 Apr 2020 18:16:54 +0200 Message-Id: <20200401161547.283656294@linuxfoundation.org> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200401161542.669484650@linuxfoundation.org> References: <20200401161542.669484650@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Madalin Bucur [ Upstream commit 26d5bb9e4c4b541c475751e015072eb2cbf70d15 ] FMAN DMA read or writes under heavy traffic load may cause FMAN internal resource leak; thus stopping further packet processing. The FMAN internal queue can overflow when FMAN splits single read or write transactions into multiple smaller transactions such that more than 17 AXI transactions are in flight from FMAN to interconnect. When the FMAN internal queue overflows, it can stall further packet processing. The issue can occur with any one of the following three conditions: 1. FMAN AXI transaction crosses 4K address boundary (Errata A010022) 2. FMAN DMA address for an AXI transaction is not 16 byte aligned, i.e. the last 4 bits of an address are non-zero 3. Scatter Gather (SG) frames have more than one SG buffer in the SG list and any one of the buffers, except the last buffer in the SG list has data size that is not a multiple of 16 bytes, i.e., other than 16, 32, 48, 64, etc. With any one of the above three conditions present, there is likelihood of stalled FMAN packet processing, especially under stress with multiple ports injecting line-rate traffic. To avoid situations that stall FMAN packet processing, all of the above three conditions must be avoided; therefore, configure the system with the following rules: 1. Frame buffers must not span a 4KB address boundary, unless the frame start address is 256 byte aligned 2. All FMAN DMA start addresses (for example, BMAN buffer address, FD[address] + FD[offset]) are 16B aligned 3. SG table and buffer addresses are 16B aligned and the size of SG buffers are multiple of 16 bytes, except for the last SG buffer that can be of any size. Additional workaround notes: - Address alignment of 64 bytes is recommended for maximally efficient system bus transactions (although 16 byte alignment is sufficient to avoid the stall condition) - To support frame sizes that are larger than 4K bytes, there are two options: 1. Large single buffer frames that span a 4KB page boundary can be converted into SG frames to avoid transaction splits at the 4KB boundary, 2. Align the large single buffer to 256B address boundaries, ensure that the frame address plus offset is 256B aligned. - If software generated SG frames have buffers that are unaligned and with random non-multiple of 16 byte lengths, before transmitting such frames via FMAN, frames will need to be copied into a new single buffer or multiple buffer SG frame that is compliant with the three rules listed above. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- Documentation/devicetree/bindings/net/fsl-fman.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Documentation/devicetree/bindings/net/fsl-fman.txt b/Documentation/devicetree/bindings/net/fsl-fman.txt index 299c0dcd67db4..1316f0aec0cf3 100644 --- a/Documentation/devicetree/bindings/net/fsl-fman.txt +++ b/Documentation/devicetree/bindings/net/fsl-fman.txt @@ -110,6 +110,13 @@ PROPERTIES Usage: required Definition: See soc/fsl/qman.txt and soc/fsl/bman.txt +- fsl,erratum-a050385 + Usage: optional + Value type: boolean + Definition: A boolean property. Indicates the presence of the + erratum A050385 which indicates that DMA transactions that are + split can result in a FMan lock. + ============================================================================= FMan MURAM Node -- 2.20.1