]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt: make sure xmit_more + errors does not miss doorbells
authorJakub Kicinski <kuba@kernel.org>
Thu, 12 Aug 2021 21:42:41 +0000 (14:42 -0700)
committerJakub Kicinski <kuba@kernel.org>
Fri, 13 Aug 2021 17:26:17 +0000 (10:26 -0700)
commit78ce35bf228e3f283b2f5bd0281789821a23259b
treef927a2d495970866dfb4f0950c2e58f21c010f15
parent101b8731011847525ccb0f0d4682e2daa0292855
bnxt: make sure xmit_more + errors does not miss doorbells

skbs are freed on error and not put on the ring. We may, however,
be in a situation where we're freeing the last skb of a batch,
and there is a doorbell ring pending because of xmit_more() being
true earlier. Make sure we ring the door bell in such situations.

Since errors are rare don't pay attention to xmit_more() and just
always flush the pending frames.

The busy case should be safe to be left alone because it can
only happen if start_xmit races with completions and they
both enable the queue. In that case the kick can't be pending.

Noticed while reading the code.

Fixes: 6dff915ca0d8 ("bnxt_en: Implement xmit_more.")
Reviewed-by: Michael Chan <michael.chan@broadcom.com>
Reviewed-by: Edwin Peer <edwin.peer@broadcom.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt.h