]> git.itanic.dy.fi Git - linux-stable/commitdiff
net: stmmac: Restrict warning on disabling DMA store and fwd mode
authorCristian Ciocaltea <cristian.ciocaltea@collabora.com>
Fri, 10 Feb 2023 20:21:26 +0000 (22:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Feb 2023 11:57:09 +0000 (12:57 +0100)
commit 05d7623a892a9da62da0e714428e38f09e4a64d8 upstream.

When setting 'snps,force_thresh_dma_mode' DT property, the following
warning is always emitted, regardless the status of force_sf_dma_mode:

dwmac-starfive 10020000.ethernet: force_sf_dma_mode is ignored if force_thresh_dma_mode is set.

Do not print the rather misleading message when DMA store and forward
mode is already disabled.

Fixes: e2a240c7d3bc ("driver:net:stmmac: Disable DMA store and forward mode if platform data force_thresh_dma_mode is set.")
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Link: https://lore.kernel.org/r/20230210202126.877548-1-cristian.ciocaltea@collabora.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c

index 5c234a8158c719a246d291b64953ed11738612f9..e12df9d99089f090f7aeae8787723c50d0e8d46d 100644 (file)
@@ -558,7 +558,7 @@ stmmac_probe_config_dt(struct platform_device *pdev, u8 *mac)
        dma_cfg->mixed_burst = of_property_read_bool(np, "snps,mixed-burst");
 
        plat->force_thresh_dma_mode = of_property_read_bool(np, "snps,force_thresh_dma_mode");
-       if (plat->force_thresh_dma_mode) {
+       if (plat->force_thresh_dma_mode && plat->force_sf_dma_mode) {
                plat->force_sf_dma_mode = 0;
                dev_warn(&pdev->dev,
                         "force_sf_dma_mode is ignored if force_thresh_dma_mode is set.\n");