net/cxgb4: Don't retrieve stats during recovery
authorGavin Shan <shangw@linux.vnet.ibm.com>
Thu, 23 Jan 2014 04:27:35 +0000 (12:27 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 Jan 2014 21:21:03 +0000 (13:21 -0800)
commit9fe6cb58378c3b8535e00dab7195b5d35defa17a
treeca9209b3c6b40ce99d095ff0782afe382afd21bc
parent144be3d9f72fca538871b69b1f4c4af6f39d562a
net/cxgb4: Don't retrieve stats during recovery

We possibly retrieve the adapter's statistics during EEH recovery
and that should be disallowed. Otherwise, it would possibly incur
replicate EEH error and EEH recovery is going to fail eventually.

The patch reuses statistics lock and checks net_device is attached
before going to retrieve statistics, so that the problem can be
avoided.

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c