From patchwork Wed Mar 22 11:56:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joao Pinto X-Patchwork-Id: 741998 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3vp7Sk469Dz9s7f for ; Wed, 22 Mar 2017 22:56:38 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933751AbdCVL4h (ORCPT ); Wed, 22 Mar 2017 07:56:37 -0400 Received: from smtprelay4.synopsys.com ([198.182.47.9]:40433 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751054AbdCVL4e (ORCPT ); Wed, 22 Mar 2017 07:56:34 -0400 Received: from mailhost.synopsys.com (mailhost1.synopsys.com [10.12.238.239]) by smtprelay.synopsys.com (Postfix) with ESMTP id 5258824E04BD; Wed, 22 Mar 2017 04:56:12 -0700 (PDT) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id 39D538EA; Wed, 22 Mar 2017 04:56:12 -0700 (PDT) Received: from jpinto-box.internal.synopsys.com (jpinto-box.internal.synopsys.com [10.107.19.150]) by mailhost.synopsys.com (Postfix) with ESMTP id 2B54A8D2; Wed, 22 Mar 2017 04:56:09 -0700 (PDT) From: Joao Pinto To: davem@davemloft.net Cc: peppe.cavallaro@st.com, alexandre.torgue@st.com, clabbe.montjoie@gmail.com, thierry.reding@gmail.com, sergei.shtylyov@cogentembedded.com, f.fainelli@gmail.com, netdev@vger.kernel.org, Joao Pinto Subject: [PATCH v3 net-next] net: stmmac: fix dma operation mode config for older versions Date: Wed, 22 Mar 2017 11:56:05 +0000 Message-Id: <3b8aeab69d2987db68c74f48a3ac13c7241e1542.1490183441.git.jpinto@synopsys.com> X-Mailer: git-send-email 2.9.3 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 Reviewed-by: Thierry Reding Signed-off-by: Joao Pinto Tested-by: Corentin Labbe --- changes v2->v3: - Commit ID and title should be under a 'Fixes' tag changes v1->v2: - commit id did not have 12 digits drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 +++--- 1 file 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 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) {