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.

It's responsing to bug#110450.

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
1 file changed