Skip to content

Commit 05d7623

Browse files
cristiccPaolo Abeni
authored andcommitted
net: stmmac: Restrict warning on disabling DMA store and fwd mode
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: e2a240c ("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>
1 parent 21c167a commit 05d7623

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ stmmac_probe_config_dt(struct platform_device *pdev, u8 *mac)
559559
dma_cfg->mixed_burst = of_property_read_bool(np, "snps,mixed-burst");
560560

561561
plat->force_thresh_dma_mode = of_property_read_bool(np, "snps,force_thresh_dma_mode");
562-
if (plat->force_thresh_dma_mode) {
562+
if (plat->force_thresh_dma_mode && plat->force_sf_dma_mode) {
563563
plat->force_sf_dma_mode = 0;
564564
dev_warn(&pdev->dev,
565565
"force_sf_dma_mode is ignored if force_thresh_dma_mode is set.\n");

0 commit comments

Comments
 (0)