diff mbox

[net-next] net: fix dma operation mode config for older versions

Message ID 3b8aeab69d2987db68c74f48a3ac13c7241e1542.1490117473.git.jpinto@synopsys.com
State Superseded, archived
Delegated to: David Miller
Headers show

Commit Message

Joao Pinto March 21, 2017, 5:36 p.m. UTC
This patch fixes a bug introduced in commit:
6deee22 (net: stmmac: prepare dma op mode config for multiple queues)

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.

Reported-by: Corentin Labbe <clabbe.montjoie@gmail.com>

Signed-off-by: Joao Pinto <jpinto@synopsys.com>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Sergei Shtylyov March 21, 2017, 5:53 p.m. UTC | #1
On 03/21/2017 08:36 PM, Joao Pinto wrote:

> This patch fixes a bug introduced in commit:
> 6deee22 (net: stmmac: prepare dma op mode config for multiple queues)

    Need 12 hex digits and the commit summary enclosed into ("").

> 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.
>
> Reported-by: Corentin Labbe <clabbe.montjoie@gmail.com>
>
> Signed-off-by: Joao Pinto <jpinto@synopsys.com>
[...]

MBR, Sergei
Joao Pinto March 21, 2017, 5:58 p.m. UTC | #2
Às 5:53 PM de 3/21/2017, Sergei Shtylyov escreveu:
> On 03/21/2017 08:36 PM, Joao Pinto wrote:
> 
>> This patch fixes a bug introduced in commit:
>> 6deee22 (net: stmmac: prepare dma op mode config for multiple queues)
> 
>    Need 12 hex digits and the commit summary enclosed into ("").
> 
>> 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.
>>
>> Reported-by: Corentin Labbe <clabbe.montjoie@gmail.com>
>>
>> Signed-off-by: Joao Pinto <jpinto@synopsys.com>
> [...]
> 
> MBR, Sergei
> 

Thanks for the tip, going to send a v2.

Joao
diff mbox

Patch

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index d3a2151..225a3a3 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -1945,9 +1945,6 @@  static void stmmac_mtl_configuration(struct stmmac_priv *priv)
 	/* Enable MAC RX Queues */
 	if (rx_queues_count > 1 && 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);
 }
 
 /**
@@ -2014,6 +2011,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) {