Skip to content

Commit e0302de

Browse files
committed
net: stmmac: add attribute to disable split header support
Split headers (SPH) is a DMA feature to split the header and payload in the receive path. See `SPH` bit in `EMAC_DMA[n]_CTL` register on page 30-255 of the ADSP-SC598 HRM. With this feature enabled I ran into a oops fairly quickly on 5.15 and immediately on 6.12. [ 6129.476843] Unable to handle kernel paging request at virtual address ffff00019414af80 ... [ 6129.657171] dcache_inval_poc+0x28/0x58 [ 6129.660990] dma_direct_sync_single_for_cpu+0x3c/0x70 [ 6129.666024] __dma_sync_single_for_cpu+0x34/0x6c [ 6129.670625] stmmac_napi_poll_rx+0x8dc/0xb64 ... https://lore.kernel.org/all/CABnpCuCLN6VNgmoWHwc4_8AT34xqmQnEoUHLncvE2yLqYZBaKg@mail.gmail.com/ Matches the above stack trace most closely and includes some debugging information. https://lore.kernel.org/all/[email protected] Includes some debug code from an Nvidia Tegra developer who states the code, "causes other issues". In my testing passing `buf1_len` causes the following: Connection to ... closed by remote host. Note that `dwmac-intel.c` and `dwmac-dwc-qos-eth.c`, primarily used by Nvidia Tegra SoCs, have already disabled this feature: 47f753c ("net: stmmac: disable Split Header (SPH) for Intel platforms") 029c1c2 ("net: stmmac: dwc-qos: Disable split header for Tegra194") In testing disabling split headers resulted in a 200 Mbits/sec decrease in performance on receive. Signed-off-by: Philip Molloy <[email protected]>
1 parent 76b1422 commit e0302de

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,9 @@ stmmac_probe_config_dt(struct platform_device *pdev, u8 *mac)
503503
if (of_property_read_bool(np, "snps,en-tx-lpi-clockgating"))
504504
plat->flags |= STMMAC_FLAG_EN_TX_LPI_CLOCKGATING;
505505

506+
if (of_property_read_bool(np, "snps,sph-disable"))
507+
plat->flags |= STMMAC_FLAG_SPH_DISABLE;
508+
506509
/* Set the maxmtu to a default of JUMBO_LEN in case the
507510
* parameter is not present in the device tree.
508511
*/

0 commit comments

Comments
 (0)