]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: Fix inconsistent BNXT_FLAG_AGG_RINGS logic.
authorMichael Chan <michael.chan@broadcom.com>
Mon, 9 Jul 2018 06:24:48 +0000 (02:24 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 9 Jul 2018 23:27:14 +0000 (16:27 -0700)
commit3aa4cff658f6f34dae63cc1591ed8a829681e939
tree02396c7e61c477c4f4ad125fc45e8dfd361258f0
parentd5910fb94d17e1a68fa889f4db7458b730821dc4
bnxt_en: Fix inconsistent BNXT_FLAG_AGG_RINGS logic.

If there aren't enough RX rings available, the driver will attempt to
use a single RX ring without the aggregation ring.  If that also
fails, the BNXT_FLAG_AGG_RINGS flag is cleared but the other ring
parameters are not set consistently to reflect that.  If more RX
rings become available at the next open, the RX rings will be in
an inconsistent state and may crash when freeing the RX rings.

Fix it by restoring the BNXT_FLAG_AGG_RINGS if not enough RX rings are
available to run without aggregation rings.

Fixes: 2d3df87dfba1 ("bnxt_en: Handle no aggregation ring gracefully.")
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