]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
net: systemport: enable RX interrupts after NAPI
authorFlorian Fainelli <f.fainelli@gmail.com>
Tue, 28 Oct 2014 18:12:00 +0000 (11:12 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 28 Oct 2014 21:08:47 +0000 (17:08 -0400)
commit8edf0047f4b8e03d94ef88f5a7dec146cce03a06
tree892a40c55dc38874b48f0ec3e78dd832e8753937
parentebcf34f3d4be11f994340aff629f3c17171a4f65
net: systemport: enable RX interrupts after NAPI

There is currently a small window during which the SYSTEMPORT adapter
enables its RX interrupts without having enabled its NAPI handler, which
can result in packets to be discarded during interface bringup.

A similar but more serious window exists in bcm_sysport_resume() during
which we can have the RDMA engine not fully prepared to receive packets
and yet having RX interrupts enabled.

Fix this my moving the RX interrupt enable down to
bcm_sysport_netif_start() after napi_enable() for the RX path is called,
which fixes both call sites: bcm_sysport_open() and
bcm_sysport_resume().

Fixes: b02e6d9ba7ad ("net: systemport: add bcm_sysport_netif_{enable,stop}")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bcmsysport.c