Skip to content
  • Sathya Perla's avatar
    be2net: fix wrong frag_idx reported by RX CQ · d23e946c
    Sathya Perla authored
    
    
    The RX CQ can report completions with invalid frag_idx when the RXQ that
    was *previously* using it, was not cleaned up properly. This hits
    a BUG_ON() in be2net.
    
    When completion coalescing is enabled on a CQ, an explicit CQ-notify
    (with rearm) is needed for each compl, to flush partially coalesced CQ
    entries that are pending DMA.
    
    In be_close(), this fix now notifies CQ for each compl, waits explicitly
    for the flush compl to arrive and complains if it doesn't arrive.
    
    Also renaming be_crit_error() to be_hw_error() as it's the more
    appropriate name and to convey that we don't wait for the flush compl
    only when a HW error has occurred.
    
    Signed-off-by: default avatarSathya Perla <sathya.perla@emulex.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    d23e946c