From: David L Stevens Date: Mon, 26 Jan 2015 20:54:27 +0000 (-0500) Subject: sunvnet: improve error handling when a remote crashes X-Git-Tag: omap-for-v4.1/prcm-dts-mfd-syscon-fix~134^2~121^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e2b60cd18381a2f102dc6157ea2481a9ddd0001;p=pandora-kernel.git sunvnet: improve error handling when a remote crashes 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: David L Stevens Signed-off-by: David S. Miller --- Reading git-diff-tree failed