]> git.proxmox.com Git - mirror_ubuntu-artful-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)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Tue, 27 Jun 2017 13:16:22 +0000 (10:16 -0300)
commit3029eba149c69e09b5955f18aae934d09751bb33
tree8906a63557578536ceef9e369e91513f65911a26
parent8b9c24e865e70a8cd3f4092998673ae4c44a0977
net: ethoc: enable NAPI before poll may be scheduled

BugLink: http://bugs.launchpad.net/bugs/1698799
[ Upstream commit d220b942a4b6a0640aee78841608f4aa5e8e185e ]

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: a1702857724f ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
drivers/net/ethernet/ethoc.c