• David L Stevens's avatar
    sunvnet: improve error handling when a remote crashes · 8e2b60cd
    David L Stevens authored
    If a remote machine crashes while there are pending transmit buffers, the
    sunvnet driver reallocates the ring descriptors giving us enries that have
    state VIO_DESC_FREE but also an allocated skb. This results in a BUG_ON()
    call when the remote reboots and we reach that point in the ring.
    This patch:
    1) clears pending tx packets in the ring on port reset
    2) changes a BUG_ON() to a pr_warn() when a remote host has given us an invalid
    	descriptor state
    3) collapses multiple active buffer frees in a ring to a single message per
    	ring and adds the device name and remote MAC address
    This fixes the particular problem of not cleaning up pending buffers on a
    reset, but also prevents us from crashing if the remote handles descriptors
    out of order or sets an unexpected state for a descriptor.
    Signed-off-by: default avatarDavid L Stevens <david.stevens@oracle.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
sunvnet.c 49.1 KB