Skip to content

Commit b4f0a66

Browse files
Joao Pintodavem330
authored andcommitted
net: stmmac: fix dma operation mode config for older versions
The dma operation mode configuration routine was wrongly moved to a function (stmmac_mtl_configuration) that is only executed if the core version is >= 4.00. Fixes: 6deee22 ("net: stmmac: prepare dma op mode config for multiple queues") Reported-by: Corentin Labbe <[email protected]> Reviewed-by: Thierry Reding <[email protected]> Signed-off-by: Joao Pinto <[email protected]> Tested-by: Corentin Labbe <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent bbea124 commit b4f0a66

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2388,9 +2388,6 @@ static void stmmac_mtl_configuration(struct stmmac_priv *priv)
23882388
if (priv->hw->mac->rx_queue_enable)
23892389
stmmac_mac_enable_rx_queues(priv);
23902390

2391-
/* Set the HW DMA mode and the COE */
2392-
stmmac_dma_operation_mode(priv);
2393-
23942391
/* Set RX priorities */
23952392
if (rx_queues_count > 1 && priv->hw->mac->rx_queue_prio)
23962393
stmmac_mac_config_rx_queues_prio(priv);
@@ -2468,6 +2465,9 @@ static int stmmac_hw_setup(struct net_device *dev, bool init_ptp)
24682465
else
24692466
stmmac_set_mac(priv->ioaddr, true);
24702467

2468+
/* Set the HW DMA mode and the COE */
2469+
stmmac_dma_operation_mode(priv);
2470+
24712471
stmmac_mmc_setup(priv);
24722472

24732473
if (init_ptp) {

0 commit comments

Comments
 (0)