• Michael Chan's avatar
    bnxt_en: Do not adjust max_cp_rings by the ones used by RDMA. · 00fe9c32
    Michael Chan authored
    Currently, the driver adjusts the bp->hw_resc.max_cp_rings by the number
    of MSIX vectors used by RDMA.  There is one code path in open that needs
    to check the true max_cp_rings including any used by RDMA.  This code
    is now checking for the reduced max_cp_rings which will fail when the
    number of cp rings is very small.
    
    To fix this in a clean way, we don't adjust max_cp_rings anymore.
    Instead, we add a helper bnxt_get_max_func_cp_rings_for_en() to get the
    reduced max_cp_rings when appropriate.
    
    Fixes: ec86f14e ("bnxt_en: Add ULP calls to stop and restart IRQs.")
    Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    00fe9c32
bnxt.h 44.4 KB