mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
UPSTREAM: net: arc_emac: reset txbd_curr and txbd_dirty pointers to zero
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
Change-Id: Ie37cbd4761f8df216b2ddc5d07c0d6f036ac7092
Signed-off-by: Alexander Kochetkov <al.kochet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
(cherry picked from git.kernel.org next/linux-next.git master
commit 99f93a156a)
This commit is contained in:
committed by
Caesar Wang
parent
d6fa11ae9c
commit
a1f14d6216
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user