From: Bob Liu <lliubbo@gmail.com>
To: <davem@davemloft.net>
Cc: <peppe.cavallaro@st.com>, <francesco.virlinzi@st.com>,
<rayagond@vayavyalabs.com>, <sr@denx.de>,
<netdev@vger.kernel.org>,
<uclinux-dist-devel@blackfin.uclinux.org>,
Bob Liu <lliubbo@gmail.com>
Subject: [PATCH 3/3] drivers: net: ethernet: stmmac: fix resume function
Date: Tue, 22 May 2012 15:38:56 +0800 [thread overview]
Message-ID: <1337672336-7378-3-git-send-email-lliubbo@gmail.com> (raw)
In-Reply-To: <1337672336-7378-1-git-send-email-lliubbo@gmail.com>
After wake up from mem, ping fails to work.
This patch fix the resume function in stmmac driver.
Signed-off-by: Bob Liu <lliubbo@gmail.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 714faa2..22243a5 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -1952,6 +1952,15 @@ int stmmac_resume(struct net_device *ndev)
priv->hw->mac->pmt(priv->ioaddr, 0);
netif_device_attach(ndev);
+ priv->dirty_tx = 0;
+ priv->cur_tx = 0;
+ priv->cur_rx = 0;
+ priv->dirty_rx = 0;
+
+ /* DMA initialization and SW reset */
+ priv->hw->dma->init(priv->ioaddr, priv->plat->pbl,
+ priv->dma_tx_phy, priv->dma_rx_phy);
+ priv->hw->mac->core_init(priv->ioaddr);
/* Enable the MAC and DMA */
stmmac_set_mac(priv->ioaddr, true);
--
1.7.0.4
next prev parent reply other threads:[~2012-05-22 7:38 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-22 7:38 [PATCH 1/3] drivers: net: stmmac: add blackfin support Bob Liu
2012-05-22 7:38 ` [PATCH 2/3] drivers: net: ethernet: stmmac: fix failure in module test Bob Liu
2012-05-22 11:56 ` Ben Hutchings
2012-05-22 12:51 ` Giuseppe CAVALLARO
2012-05-23 5:09 ` Bob Liu
2012-05-23 6:08 ` Giuseppe CAVALLARO
2012-05-23 6:05 ` [net] stmmac: fix driver Kconfig when built as module Giuseppe CAVALLARO
2012-05-23 18:01 ` David Miller
2012-05-28 5:44 ` Giuseppe CAVALLARO
2012-05-22 7:38 ` Bob Liu [this message]
2012-05-22 12:36 ` [PATCH 1/3] drivers: net: stmmac: add blackfin support Giuseppe CAVALLARO
2012-05-23 7:58 ` Bob Liu
2012-05-23 8:21 ` Giuseppe CAVALLARO
2012-05-23 8:27 ` Giuseppe CAVALLARO
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=1337672336-7378-3-git-send-email-lliubbo@gmail.com \
--to=lliubbo@gmail.com \
--cc=davem@davemloft.net \
--cc=francesco.virlinzi@st.com \
--cc=netdev@vger.kernel.org \
--cc=peppe.cavallaro@st.com \
--cc=rayagond@vayavyalabs.com \
--cc=sr@denx.de \
--cc=uclinux-dist-devel@blackfin.uclinux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.