From: Weifeng Voon <weifeng.voon@intel.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Ong Boon Leong <boon.leong.ong@intel.com>,
Kweh Hock Leong <hock.leong.kweh@intel.com>,
Weifeng Voon <weifeng.voon@intel.com>
Subject: [PATCH 3/7] net: stmmac: dma channel control register need to be init first
Date: Thu, 25 Apr 2019 01:17:17 +0800 [thread overview]
Message-ID: <1556126241-2774-4-git-send-email-weifeng.voon@intel.com> (raw)
In-Reply-To: <1556126241-2774-1-git-send-email-weifeng.voon@intel.com>
stmmac_init_chan() needs to be called before stmmac_init_rx_chan() and
stmmac_init_tx_chan(). This is because if PBLx8 is to be used,
"DMA_CH(#i)_Control.PBLx8" needs to be set before programming
"DMA_CH(#i)_TX_Control.TxPBL" and "DMA_CH(#i)_RX_Control.RxPBL".
Reviewed-by: Zhang, Baoli <baoli.zhang@intel.com>
Signed-off-by: Weifeng Voon <weifeng.voon@intel.com>
Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index a26e36d..ec031e3 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -2208,6 +2208,10 @@ static int stmmac_init_dma_engine(struct stmmac_priv *priv)
if (priv->plat->axi)
stmmac_axi(priv, priv->ioaddr, priv->plat->axi);
+ /* DMA CSR Channel configuration */
+ for (chan = 0; chan < dma_csr_ch; chan++)
+ stmmac_init_chan(priv, priv->ioaddr, priv->plat->dma_cfg, chan);
+
/* DMA RX Channel Configuration */
for (chan = 0; chan < rx_channels_count; chan++) {
rx_q = &priv->rx_queue[chan];
@@ -2233,10 +2237,6 @@ static int stmmac_init_dma_engine(struct stmmac_priv *priv)
tx_q->tx_tail_addr, chan);
}
- /* DMA CSR Channel configuration */
- for (chan = 0; chan < dma_csr_ch; chan++)
- stmmac_init_chan(priv, priv->ioaddr, priv->plat->dma_cfg, chan);
-
return ret;
}
--
1.9.1
next prev parent reply other threads:[~2019-04-24 9:16 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-24 17:17 [PATCH 0/7] net: stmmac: enable EHL SGMII Weifeng Voon
2019-04-24 9:26 ` Jose Abreu
2019-04-24 13:48 ` Andrew Lunn
2019-04-25 7:27 ` Voon, Weifeng
2019-04-25 12:38 ` Andrew Lunn
2019-04-25 14:39 ` Ong, Boon Leong
2019-04-25 15:23 ` Andrew Lunn
2019-04-29 5:37 ` Ong, Boon Leong
2019-04-29 13:10 ` Andrew Lunn
2019-04-29 13:44 ` Jose Abreu
2019-04-24 17:17 ` [PATCH 1/7] net: stmmac: add EHL SGMII 1Gbps platform data and PCI ID Weifeng Voon
2019-04-25 7:04 ` Voon, Weifeng
2019-04-25 12:24 ` Andrew Lunn
2019-04-26 2:10 ` Voon, Weifeng
2019-04-24 17:17 ` [PATCH 2/7] net: stmmac: enable clause 45 mdio support Weifeng Voon
2019-04-24 13:18 ` Andrew Lunn
2019-04-25 7:12 ` Voon, Weifeng
2019-04-24 17:17 ` Weifeng Voon [this message]
2019-04-25 7:06 ` [PATCH 3/7] net: stmmac: dma channel control register need to be init first Voon, Weifeng
2019-04-29 10:25 ` Jose Abreu
2019-04-30 2:49 ` Voon, Weifeng
2019-04-24 17:17 ` [PATCH 4/7] net: stmmac: introducing support for DWC xPCS logics Weifeng Voon
2019-04-24 13:41 ` Andrew Lunn
2019-04-25 1:45 ` Ong, Boon Leong
2019-04-25 3:21 ` Andrew Lunn
2019-04-25 6:51 ` Ong, Boon Leong
2019-04-25 12:22 ` Andrew Lunn
2019-04-25 7:06 ` Voon, Weifeng
2019-04-29 13:23 ` Jose Abreu
2019-04-24 17:17 ` [PATCH 5/7] net: stmmac: add xpcs function hooks into main driver and ethtool Weifeng Voon
2019-04-25 7:07 ` Voon, Weifeng
2019-04-24 17:17 ` [PATCH 6/7] net: stmmac: add xPCS platform data for EHL Weifeng Voon
2019-04-25 7:08 ` Voon, Weifeng
2019-04-24 17:17 ` [PATCH 7/7] net: stmmac: add xPCS functions for device with DWMACv5.1 Weifeng Voon
2019-04-25 7:09 ` Voon, Weifeng
2019-04-25 7:00 ` [PATCH 0/7] net: stmmac: enable EHL SGMII Voon, Weifeng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1556126241-2774-4-git-send-email-weifeng.voon@intel.com \
--to=weifeng.voon@intel.com \
--cc=boon.leong.ong@intel.com \
--cc=davem@davemloft.net \
--cc=hock.leong.kweh@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).