From 54309fa60b5f57b90c1842176f6045e665d21142 Mon Sep 17 00:00:00 2001 From: Frank Li Date: Tue, 7 May 2013 14:08:44 +0000 Subject: [PATCH] net: fec: fix kernel oops when plug/unplug cable many times reproduce steps 1. flood ping from other machine ping -f -s 41000 IP 2. run below script while [ 1 ]; do ethtool -s eth0 autoneg off; sleep 3;ethtool -s eth0 autoneg on; sleep 4; done; You can see oops in one hour. The reason is fec_restart clear BD but NAPI may use it. The solution is disable NAPI and stop xmit when reset BD. disable NAPI may sleep, so fec_restart can't be call in atomic context. Signed-off-by: Frank Li Reviewed-by: Lucas Stach Tested-by: Lucas Stach Signed-off-by: David S. Miller --- Reading git-format-patch failed