UPSTREAM: net: arc_emac: reset txbd_curr and txbd_dirty pointers to zero
authorAlexander Kochetkov <al.kochet@gmail.com>
Tue, 9 Feb 2016 15:20:39 +0000 (18:20 +0300)
committerCaesar Wang <wxt@rock-chips.com>
Tue, 31 May 2016 08:43:13 +0000 (16:43 +0800)
commita1f14d6216762bc9ba14eff88d6709544d96aaeb
treebaca0a9cb21b4b34237031d19e71db32becac687
parentd6fa11ae9c8e6d72aaddc563cb8c624f4b6e1fc7
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 99f93a156a2aa9ac1e44f7cb1a197425e6d9879a)
drivers/net/ethernet/arc/emac_main.c