aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
diff options
context:
space:
mode:
authorJoao Pinto <Joao.Pinto@synopsys.com>2017-03-22 11:56:05 +0000
committerDavid S. Miller <davem@davemloft.net>2017-03-22 15:35:03 -0700
commitb4f0a66155564aaf7e98492e027efad9f797c244 (patch)
treef26e736c78972ceb693476b12d124e44ea043d2e /drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
parentnet: ipv6: Add sysctl for minimum prefix len acceptable in RIOs. (diff)
downloadlinux-dev-b4f0a66155564aaf7e98492e027efad9f797c244.tar.xz
linux-dev-b4f0a66155564aaf7e98492e027efad9f797c244.zip
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: 6deee2221e11 ("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>
Diffstat (limited to '')
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 98e0f80de9d8..4b418d2aec38 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -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);
@@ -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) {