]> git.baikalelectronics.ru Git - kernel.git/commit
net: ethoc: enable NAPI before poll may be scheduled
authorMax Filippov <jcmvbkbc@gmail.com>
Tue, 6 Jun 2017 01:31:16 +0000 (18:31 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 6 Jun 2017 20:22:51 +0000 (16:22 -0400)
commitb65af3c8c2effa8b0f259f176f3c5cf15fd13197
tree92eee1af3dffa61287c917453c3b59ca01b58f87
parentc340c2508013b288d69fa2c31ae470a532b0f6e2
net: ethoc: enable NAPI before poll may be scheduled

ethoc_reset enables device interrupts, ethoc_interrupt may schedule a
NAPI poll before NAPI is enabled in the ethoc_open, which results in
device being unable to send or receive anything until it's closed and
reopened. In case the device is flooded with ingress packets it may be
unable to recover at all.
Move napi_enable above ethoc_reset in the ethoc_open to fix that.

Fixes: b53478de799c ("net: Add support for the OpenCores 10/100 Mbps Ethernet MAC.")
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Reviewed-by: Tobias Klauser <tklauser@distanz.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ethoc.c