• Michael Chan's avatar
    bnxt_en: Fix inconsistent BNXT_FLAG_AGG_RINGS logic. · 07f4fde5
    Michael Chan authored
    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: bdbd1eb5 ("bnxt_en: Handle no aggregation ring gracefully.")
    Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    07f4fde5
bnxt.c 233 KB