From: Alexander Kochetkov <al.kochet@gmail.com>
To: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
"'David S. Miller'" <davem@davemloft.net>,
Alexander Kochetkov <al.kochet@gmail.com>
Subject: [PATCH 2/3] net: arc_emac: reset txbd_curr and txbd_dirty pointers to zero
Date: Tue, 9 Feb 2016 18:20:39 +0300 [thread overview]
Message-ID: <1455031240-29385-3-git-send-email-al.kochet@gmail.com> (raw)
In-Reply-To: <1455031240-29385-1-git-send-email-al.kochet@gmail.com>
EMAC reset internal tx ring pointer to zero at statup.
txbd_curr and txbd_dirty can be different from zero.
That cause ethernet transfer hang (no packets transmitted).
In order to reproduce, run on device:
ifconfig eth0 down
ifconfig eth0 up
Signed-off-by: Alexander Kochetkov <al.kochet@gmail.com>
---
CC: stable@vger.kernel.org # 3.18.x-
---
drivers/net/ethernet/arc/emac_main.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ethernet/arc/emac_main.c b/drivers/net/ethernet/arc/emac_main.c
index 63a63e3..4f6e5be 100644
--- a/drivers/net/ethernet/arc/emac_main.c
+++ b/drivers/net/ethernet/arc/emac_main.c
@@ -447,6 +447,9 @@ static int arc_emac_open(struct net_device *ndev)
*last_rx_bd = (*last_rx_bd + 1) % RX_BD_NUM;
}
+ priv->txbd_curr = 0;
+ priv->txbd_dirty = 0;
+
/* Clean Tx BD's */
memset(priv->txbd, 0, TX_RING_SZ);
--
1.7.9.5
next prev parent reply other threads:[~2016-02-09 15:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-09 15:20 Fixes for rockchip EMAC Alexander Kochetkov
2016-02-09 15:20 ` [PATCH 1/3] net: arc_emac: fix koops caused by sk_buff free Alexander Kochetkov
2016-02-09 15:20 ` Alexander Kochetkov [this message]
2016-02-09 15:20 ` [PATCH 3/3] net: arc_emac: fix sk_buff leak Alexander Kochetkov
2016-02-16 20:27 ` Fixes for rockchip EMAC David Miller
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=1455031240-29385-3-git-send-email-al.kochet@gmail.com \
--to=al.kochet@gmail.com \
--cc=davem@davemloft.net \
--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
all inboxes | Powered by JetHome®