Skip to content

Commit

Permalink
net: stmmac: fix dma operation mode config for older versions
Browse files Browse the repository at this point in the history
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 <clabbe.montjoie@gmail.com>
Reviewed-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Joao Pinto <jpinto@synopsys.com>
Tested-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Joao Pinto authored and David S. Miller committed Mar 22, 2017
1 parent bbea124 commit b4f0a66
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2388,9 +2388,6 @@ static void stmmac_mtl_configuration(struct stmmac_priv *priv)
if (priv->hw->mac->rx_queue_enable)
stmmac_mac_enable_rx_queues(priv);

/* Set the HW DMA mode and the COE */
stmmac_dma_operation_mode(priv);

/* Set RX priorities */
if (rx_queues_count > 1 && priv->hw->mac->rx_queue_prio)
stmmac_mac_config_rx_queues_prio(priv);
Expand Down Expand Up @@ -2468,6 +2465,9 @@ static int stmmac_hw_setup(struct net_device *dev, bool init_ptp)
else
stmmac_set_mac(priv->ioaddr, true);

/* Set the HW DMA mode and the COE */
stmmac_dma_operation_mode(priv);

stmmac_mmc_setup(priv);

if (init_ptp) {
Expand Down

0 comments on commit b4f0a66

Please sign in to comment.