162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only 262306a36Sopenharmony_ciconfig FSL_FMAN 362306a36Sopenharmony_ci tristate "FMan support" 462306a36Sopenharmony_ci depends on FSL_SOC || ARCH_LAYERSCAPE || COMPILE_TEST 562306a36Sopenharmony_ci select GENERIC_ALLOCATOR 662306a36Sopenharmony_ci select PHYLINK 762306a36Sopenharmony_ci select PCS_LYNX 862306a36Sopenharmony_ci select CRC32 962306a36Sopenharmony_ci default n 1062306a36Sopenharmony_ci help 1162306a36Sopenharmony_ci Freescale Data-Path Acceleration Architecture Frame Manager 1262306a36Sopenharmony_ci (FMan) support 1362306a36Sopenharmony_ci 1462306a36Sopenharmony_ciconfig DPAA_ERRATUM_A050385 1562306a36Sopenharmony_ci bool 1662306a36Sopenharmony_ci depends on ARM64 && FSL_DPAA 1762306a36Sopenharmony_ci default y 1862306a36Sopenharmony_ci help 1962306a36Sopenharmony_ci DPAA FMan erratum A050385 software workaround implementation: 2062306a36Sopenharmony_ci align buffers, data start, SG fragment length to avoid FMan DMA 2162306a36Sopenharmony_ci splits. 2262306a36Sopenharmony_ci FMAN DMA read or writes under heavy traffic load may cause FMAN 2362306a36Sopenharmony_ci internal resource leak thus stopping further packet processing. 2462306a36Sopenharmony_ci The FMAN internal queue can overflow when FMAN splits single 2562306a36Sopenharmony_ci read or write transactions into multiple smaller transactions 2662306a36Sopenharmony_ci such that more than 17 AXI transactions are in flight from FMAN 2762306a36Sopenharmony_ci to interconnect. When the FMAN internal queue overflows, it can 2862306a36Sopenharmony_ci stall further packet processing. The issue can occur with any 2962306a36Sopenharmony_ci one of the following three conditions: 3062306a36Sopenharmony_ci 1. FMAN AXI transaction crosses 4K address boundary (Errata 3162306a36Sopenharmony_ci A010022) 3262306a36Sopenharmony_ci 2. FMAN DMA address for an AXI transaction is not 16 byte 3362306a36Sopenharmony_ci aligned, i.e. the last 4 bits of an address are non-zero 3462306a36Sopenharmony_ci 3. Scatter Gather (SG) frames have more than one SG buffer in 3562306a36Sopenharmony_ci the SG list and any one of the buffers, except the last 3662306a36Sopenharmony_ci buffer in the SG list has data size that is not a multiple 3762306a36Sopenharmony_ci of 16 bytes, i.e., other than 16, 32, 48, 64, etc. 3862306a36Sopenharmony_ci With any one of the above three conditions present, there is 3962306a36Sopenharmony_ci likelihood of stalled FMAN packet processing, especially under 4062306a36Sopenharmony_ci stress with multiple ports injecting line-rate traffic. 41