• Michael Chan's avatar
    cnic: Fix crash in cnic_bnx2x_service_kcq() · 48a30569
    Michael Chan authored
    commit 104a43ed
        cnic: Use CHIP_NUM macros from bnx2x.h
    
    changed the code to use the bnx2x macro NO_FCOE() to determine if FCoE
    is supported or not.  There is another place in cnic that is still using
    the old method to determine if FCoE is supported or not.  The 2 methods
    may not yield the same result after the network interface is brought down
    and up.  This will cause the crash as cnic_bnx2x_service_kcq() will access
    the uninitialized cp->kcq2.
    
    The fix is to consistently use the same macro CNIC_SUPPORTS_FCOE() which
    uses the bnx2x NO_FCOE() macro.  As a follow-up, we can clean up the code
    to remove the old method as it is no longer needed.
    Signed-off-by: default avatarMichael Chan <mchan@broadcom.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    48a30569
cnic.c 148 KB