18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only 28c2ecf20Sopenharmony_ciconfig FSL_FMAN 38c2ecf20Sopenharmony_ci tristate "FMan support" 48c2ecf20Sopenharmony_ci depends on FSL_SOC || ARCH_LAYERSCAPE || COMPILE_TEST 58c2ecf20Sopenharmony_ci select GENERIC_ALLOCATOR 68c2ecf20Sopenharmony_ci select PHYLIB 78c2ecf20Sopenharmony_ci select CRC32 88c2ecf20Sopenharmony_ci default n 98c2ecf20Sopenharmony_ci help 108c2ecf20Sopenharmony_ci Freescale Data-Path Acceleration Architecture Frame Manager 118c2ecf20Sopenharmony_ci (FMan) support 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ciconfig DPAA_ERRATUM_A050385 148c2ecf20Sopenharmony_ci bool 158c2ecf20Sopenharmony_ci depends on ARM64 && FSL_DPAA 168c2ecf20Sopenharmony_ci default y 178c2ecf20Sopenharmony_ci help 188c2ecf20Sopenharmony_ci DPAA FMan erratum A050385 software workaround implementation: 198c2ecf20Sopenharmony_ci align buffers, data start, SG fragment length to avoid FMan DMA 208c2ecf20Sopenharmony_ci splits. 218c2ecf20Sopenharmony_ci FMAN DMA read or writes under heavy traffic load may cause FMAN 228c2ecf20Sopenharmony_ci internal resource leak thus stopping further packet processing. 238c2ecf20Sopenharmony_ci The FMAN internal queue can overflow when FMAN splits single 248c2ecf20Sopenharmony_ci read or write transactions into multiple smaller transactions 258c2ecf20Sopenharmony_ci such that more than 17 AXI transactions are in flight from FMAN 268c2ecf20Sopenharmony_ci to interconnect. When the FMAN internal queue overflows, it can 278c2ecf20Sopenharmony_ci stall further packet processing. The issue can occur with any 288c2ecf20Sopenharmony_ci one of the following three conditions: 298c2ecf20Sopenharmony_ci 1. FMAN AXI transaction crosses 4K address boundary (Errata 308c2ecf20Sopenharmony_ci A010022) 318c2ecf20Sopenharmony_ci 2. FMAN DMA address for an AXI transaction is not 16 byte 328c2ecf20Sopenharmony_ci aligned, i.e. the last 4 bits of an address are non-zero 338c2ecf20Sopenharmony_ci 3. Scatter Gather (SG) frames have more than one SG buffer in 348c2ecf20Sopenharmony_ci the SG list and any one of the buffers, except the last 358c2ecf20Sopenharmony_ci buffer in the SG list has data size that is not a multiple 368c2ecf20Sopenharmony_ci of 16 bytes, i.e., other than 16, 32, 48, 64, etc. 378c2ecf20Sopenharmony_ci With any one of the above three conditions present, there is 388c2ecf20Sopenharmony_ci likelihood of stalled FMAN packet processing, especially under 398c2ecf20Sopenharmony_ci stress with multiple ports injecting line-rate traffic. 40