eth: bnxt: fix the wake condition
authorJakub Kicinski <kuba@kernel.org>
Wed, 7 Jun 2023 01:08:25 +0000 (18:08 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 8 Jun 2023 04:53:11 +0000 (21:53 -0700)
commit649c3fed36730a53447d8f479c14e431363563b6
treea408a7c5b0572856b576588636bcb9e0413b7c43
parentc9d99cfa66dfff4350e064adb98367cb922accf8
eth: bnxt: fix the wake condition

The down condition should be the negation of the wake condition,
IOW when I moved it from:

 if (cond && wake())
to
 if (__netif_txq_completed_wake(cond))

Cond should have been negated. Flip it now.

This bug leads to occasional crashes with netconsole.
It may also lead to queue never waking up in case BQL is not enabled.

Reported-by: David Wei <davidhwei@meta.com>
Fixes: 08a096780d92 ("bnxt: use new queue try_stop/try_wake macros")
Reviewed-by: Michael Chan <michael.chan@broadcom.com>
Link: https://lore.kernel.org/r/20230607010826.960226-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c