]> 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)
commitea69c07a87e173f1c279d128c51cbd22c6c03d46
tree92eee1af3dffa61287c917453c3b59ca01b58f87
parentf346ac1d9ec6528da8a94cb22a125941bfb26f57
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