]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bnxt_en: Fix netpoll handling.
authorMichael Chan <michael.chan@broadcom.com>
Fri, 23 Jun 2017 18:01:01 +0000 (14:01 -0400)
committerSomasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
Tue, 11 Jul 2017 00:04:10 +0000 (17:04 -0700)
commit34f68975b059252ae575f1eaeee7e1291489b124
treee6065de9739d280b14f1c5c35ed86a3e5ceeae16
parent28659c6de5fcd18888b834598835c1803a6cd44c
bnxt_en: Fix netpoll handling.

Orabug: 264025332632559926366387

To handle netpoll properly, the driver must only handle TX packets
during NAPI.  Handling RX events cause warnings and errors in
netpoll mode. The ndo_poll_controller() method should call
napi_schedule() directly so that a NAPI weight of zero will be used
during netpoll mode.

The bnxt_en driver supports 2 ring modes: combined, and separate rx/tx.
In separate rx/tx mode, the ndo_poll_controller() method will only
process the tx rings.  In combined mode, the rx and tx completion
entries are mixed in the completion ring and we need to drop the rx
entries and recycle the rx buffers.

Add a function bnxt_force_rx_discard() to handle this in netpoll mode
when we see rx entries in combined ring mode.

Reported-by: Calvin Owens <calvinowens@fb.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 2270bc5da34979454e6f2eb133d800b635156174)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
drivers/net/ethernet/broadcom/bnxt/bnxt.c