1*4882a593Smuzhiyun# SPDX-License-Identifier: GPL-2.0-only 2*4882a593Smuzhiyunconfig FSL_FMAN 3*4882a593Smuzhiyun tristate "FMan support" 4*4882a593Smuzhiyun depends on FSL_SOC || ARCH_LAYERSCAPE || COMPILE_TEST 5*4882a593Smuzhiyun select GENERIC_ALLOCATOR 6*4882a593Smuzhiyun select PHYLIB 7*4882a593Smuzhiyun select CRC32 8*4882a593Smuzhiyun default n 9*4882a593Smuzhiyun help 10*4882a593Smuzhiyun Freescale Data-Path Acceleration Architecture Frame Manager 11*4882a593Smuzhiyun (FMan) support 12*4882a593Smuzhiyun 13*4882a593Smuzhiyunconfig DPAA_ERRATUM_A050385 14*4882a593Smuzhiyun bool 15*4882a593Smuzhiyun depends on ARM64 && FSL_DPAA 16*4882a593Smuzhiyun default y 17*4882a593Smuzhiyun help 18*4882a593Smuzhiyun DPAA FMan erratum A050385 software workaround implementation: 19*4882a593Smuzhiyun align buffers, data start, SG fragment length to avoid FMan DMA 20*4882a593Smuzhiyun splits. 21*4882a593Smuzhiyun FMAN DMA read or writes under heavy traffic load may cause FMAN 22*4882a593Smuzhiyun internal resource leak thus stopping further packet processing. 23*4882a593Smuzhiyun The FMAN internal queue can overflow when FMAN splits single 24*4882a593Smuzhiyun read or write transactions into multiple smaller transactions 25*4882a593Smuzhiyun such that more than 17 AXI transactions are in flight from FMAN 26*4882a593Smuzhiyun to interconnect. When the FMAN internal queue overflows, it can 27*4882a593Smuzhiyun stall further packet processing. The issue can occur with any 28*4882a593Smuzhiyun one of the following three conditions: 29*4882a593Smuzhiyun 1. FMAN AXI transaction crosses 4K address boundary (Errata 30*4882a593Smuzhiyun A010022) 31*4882a593Smuzhiyun 2. FMAN DMA address for an AXI transaction is not 16 byte 32*4882a593Smuzhiyun aligned, i.e. the last 4 bits of an address are non-zero 33*4882a593Smuzhiyun 3. Scatter Gather (SG) frames have more than one SG buffer in 34*4882a593Smuzhiyun the SG list and any one of the buffers, except the last 35*4882a593Smuzhiyun buffer in the SG list has data size that is not a multiple 36*4882a593Smuzhiyun of 16 bytes, i.e., other than 16, 32, 48, 64, etc. 37*4882a593Smuzhiyun With any one of the above three conditions present, there is 38*4882a593Smuzhiyun likelihood of stalled FMAN packet processing, especially under 39*4882a593Smuzhiyun stress with multiple ports injecting line-rate traffic. 40