]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
commit07f4fde53d12eb8d921b465bb298e964e0bdc38c
tree02396c7e61c477c4f4ad125fc45e8dfd361258f0
parente32d4e60b350124065e0ffd9c91ac13a439aee9a
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: bdbd1eb59c56 ("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