]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: Improve RX doorbell sequence.
authorMichael Chan <michael.chan@broadcom.com>
Sat, 17 Aug 2019 21:04:48 +0000 (17:04 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sun, 18 Aug 2019 20:05:00 +0000 (13:05 -0700)
commit35c33b96ed8a8ea28e0138295682fba6d5e28d3a
tree847a33cc674c63a1a6b2ad01fc84404b421ea448
parent365cd0dbea0095c07cc3ea11760a924138165446
bnxt_en: Improve RX doorbell sequence.

When both RX buffers and RX aggregation buffers have to be
replenished at the end of NAPI, post the RX aggregation buffers first
before RX buffers.  Otherwise, we may run into a situation where
there are only RX buffers without RX aggregation buffers for a split
second.  This will cause the hardware to abort the RX packet and
report buffer errors, which will cause unnecessary cleanup by the
driver.

Ringing the Aggregation ring doorbell first before the RX ring doorbell
will prevent some of these buffer errors.  Use the same sequence during
ring initialization as well.

Fixes: 6be0fb4c6202 ("bnxt_en: Re-structure doorbells.")
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c