linux-stable/drivers/net/ethernet/stmicro/stmmac
Vincent Whitchurch f8e7dfd6fd net: stmmac: Avoid DMA_CHAN_CONTROL write if no Split Header support
The driver assumes that split headers can be enabled/disabled without
stopping/starting the device, so it writes DMA_CHAN_CONTROL from
stmmac_set_features().  However, on my system (IP v5.10a without Split
Header support), simply writing DMA_CHAN_CONTROL when DMA is running
(for example, with the commands below) leads to a TX watchdog timeout.

 host$ socat TCP-LISTEN:1024,fork,reuseaddr - &
 device$ ethtool -K eth0 tso off
 device$ ethtool -K eth0 tso on
 device$ dd if=/dev/zero bs=1M count=10 | socat - TCP4:host:1024
 <tx watchdog timeout>

Note that since my IP is configured without Split Header support, the
driver always just reads and writes the same value to the
DMA_CHAN_CONTROL register.

I don't have access to any platforms with Split Header support so I
don't know if these writes to the DMA_CHAN_CONTROL while DMA is running
actually work properly on such systems.  I could not find anything in
the databook that says that DMA_CHAN_CONTROL should not be written when
the DMA is running.

But on systems without Split Header support, there is in any case no
need to call enable_sph() in stmmac_set_features() at all since SPH can
never be toggled, so we can avoid the watchdog timeout there by skipping
this call.

Fixes: 8c6fc097a2 ("net: stmmac: gmac4+: Add Split Header support")
Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-29 12:08:05 +00:00
..
altr_tse_pcs.c
altr_tse_pcs.h
chain_mode.c
common.h ethernet: constify references to netdev->dev_addr in drivers 2021-10-14 09:22:11 -07:00
descs.h
descs_com.h
dwmac-anarion.c of: net: pass the dst buffer to of_get_mac_address() 2021-04-13 14:35:02 -07:00
dwmac-dwc-qos-eth.c of: net: pass the dst buffer to of_get_mac_address() 2021-04-13 14:35:02 -07:00
dwmac-generic.c net: stmmac: add support for dwmac 3.40a 2021-10-08 16:22:39 +01:00
dwmac-imx.c of: net: pass the dst buffer to of_get_mac_address() 2021-04-13 14:35:02 -07:00
dwmac-ingenic.c net: stmmac: Fix error return code in ingenic_mac_probe() 2021-06-16 12:02:38 -07:00
dwmac-intel-plat.c of: net: pass the dst buffer to of_get_mac_address() 2021-04-13 14:35:02 -07:00
dwmac-intel.c stmmac: intel: set PCI_D3hot in suspend 2021-06-29 11:34:48 -07:00
dwmac-intel.h stmmac: intel: move definitions to dwmac-intel header file 2021-06-12 13:10:52 -07:00
dwmac-ipq806x.c net: ethernet: stmmac: Do not use unreachable() in ipq806x_gmac_probe() 2021-08-07 09:45:46 +01:00
dwmac-loongson.c stmmac: dwmac-loongson:Fix missing return value 2021-09-06 12:52:52 +01:00
dwmac-lpc18xx.c of: net: pass the dst buffer to of_get_mac_address() 2021-04-13 14:35:02 -07:00
dwmac-mediatek.c of: net: pass the dst buffer to of_get_mac_address() 2021-04-13 14:35:02 -07:00
dwmac-meson.c of: net: pass the dst buffer to of_get_mac_address() 2021-04-13 14:35:02 -07:00
dwmac-meson8b.c of: net: pass the dst buffer to of_get_mac_address() 2021-04-13 14:35:02 -07:00
dwmac-oxnas.c of: net: pass the dst buffer to of_get_mac_address() 2021-04-13 14:35:02 -07:00
dwmac-qcom-ethqos.c net: stmmac: Use devm_platform_ioremap_resource_byname() 2021-06-09 15:24:43 -07:00
dwmac-rk.c net: stmmac: dwmac-rk: Fix ethernet on rk3399 based devices 2021-10-01 15:15:29 -07:00
dwmac-socfpga.c net: stmmac: socfpga: add runtime suspend/resume callback for stratix10 platform 2021-11-15 14:20:42 +00:00
dwmac-sti.c of: net: pass the dst buffer to of_get_mac_address() 2021-04-13 14:35:02 -07:00
dwmac-stm32.c of: net: pass the dst buffer to of_get_mac_address() 2021-04-13 14:35:02 -07:00
dwmac-sun8i.c ethernet: constify references to netdev->dev_addr in drivers 2021-10-14 09:22:11 -07:00
dwmac-sunxi.c net: stmicro: handle clk_prepare() failure during init 2021-05-13 17:33:18 +02:00
dwmac-visconti.c net: stmmac: dwmac-visconti: Make use of the helper function dev_err_probe() 2021-09-17 14:02:40 +01:00
dwmac4.h
dwmac4_core.c ethernet: constify references to netdev->dev_addr in drivers 2021-10-14 09:22:11 -07:00
dwmac4_descs.c
dwmac4_descs.h
dwmac4_dma.c net: stmmac: fix get_hw_feature() on old hardware 2021-10-08 16:22:38 +01:00
dwmac4_dma.h net: stmmac: Add HW descriptor prefetch setting for DWMAC Core 5.20 onwards 2021-04-22 15:02:40 -07:00
dwmac4_lib.c ethernet: constify references to netdev->dev_addr in drivers 2021-10-14 09:22:11 -07:00
dwmac5.c net: stmmac: enable platform specific safety features 2021-06-01 16:59:50 -07:00
dwmac5.h net: stmmac: enable platform specific safety features 2021-06-01 16:59:50 -07:00
dwmac100.h
dwmac100_core.c ethernet: constify references to netdev->dev_addr in drivers 2021-10-14 09:22:11 -07:00
dwmac100_dma.c
dwmac1000.h net: stmmac: dwmac1000: Fix extended MAC address registers definition 2021-06-11 13:05:55 -07:00
dwmac1000_core.c ethernet: constify references to netdev->dev_addr in drivers 2021-10-14 09:22:11 -07:00
dwmac1000_dma.c net: stmmac: fix get_hw_feature() on old hardware 2021-10-08 16:22:38 +01:00
dwmac_dma.h
dwmac_lib.c ethernet: constify references to netdev->dev_addr in drivers 2021-10-14 09:22:11 -07:00
dwxgmac2.h
dwxgmac2_core.c ethernet: constify references to netdev->dev_addr in drivers 2021-10-14 09:22:11 -07:00
dwxgmac2_descs.c
dwxgmac2_dma.c net: stmmac: fix get_hw_feature() on old hardware 2021-10-08 16:22:38 +01:00
dwxlgmac2.h
enh_desc.c
hwif.c
hwif.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-10-14 16:50:14 -07:00
Kconfig ethernet: fix PTP_1588_CLOCK dependencies 2021-08-13 17:49:05 -07:00
Makefile stmmac: pci: Add dwmac support for Loongson 2021-06-18 11:48:34 -07:00
mmc.h
mmc_core.c
norm_desc.c
ring_mode.c
stmmac.h net: stmmac: retain PTP clock time during SIOCSHWTSTAMP ioctls 2021-11-22 14:29:26 +00:00
stmmac_ethtool.c ethtool: extend coalesce setting uAPI with CQE mode 2021-08-24 07:38:29 -07:00
stmmac_hwtstamp.c net: stmmac: Add support for external trigger timestamping 2021-04-14 12:57:45 -07:00
stmmac_main.c net: stmmac: Avoid DMA_CHAN_CONTROL write if no Split Header support 2021-11-29 12:08:05 +00:00
stmmac_mdio.c net: stmmac: reverse Christmas tree notation in stmmac_xpcs_setup 2021-06-11 13:43:55 -07:00
stmmac_pci.c net: stmmac: enable platform specific safety features 2021-06-01 16:59:50 -07:00
stmmac_pcs.h
stmmac_platform.c net: stmmac: retain PTP clock time during SIOCSHWTSTAMP ioctls 2021-11-22 14:29:26 +00:00
stmmac_platform.h of: net: pass the dst buffer to of_get_mac_address() 2021-04-13 14:35:02 -07:00
stmmac_ptp.c net: stmmac: ptp: update tas basetime after ptp adjust 2021-07-05 10:16:17 -07:00
stmmac_ptp.h net: stmmac: Add support for external trigger timestamping 2021-04-14 12:57:45 -07:00
stmmac_selftests.c ethernet: constify references to netdev->dev_addr in drivers 2021-10-14 09:22:11 -07:00
stmmac_tc.c net: stmmac: allow a tc-taprio base-time of zero 2021-11-10 14:32:15 +00:00
stmmac_xdp.c net: stmmac: fix kernel panic due to NULL pointer dereference of xsk_pool 2021-08-25 10:59:39 +01:00
stmmac_xdp.h net: stmmac: Enable RX via AF_XDP zero-copy 2021-04-13 15:06:51 -07:00