igb: only read phy specific stats if in internal phy mode
authorNick Nunley <nicholasx.d.nunley@intel.com>
Wed, 17 Feb 2010 01:03:58 +0000 (01:03 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 17 Feb 2010 21:21:36 +0000 (13:21 -0800)
commit43915c7c9a99e38406103d9c72b73edeaa19d0ff
tree8bd6a84a28892e973b0e71c8baa4e68df90ed7ef
parente6bdb6fefc590ad2fb5f79e1d1d3660afbc7c8ff
igb: only read phy specific stats if in internal phy mode

There are a couple statistics registers that are not meant to
be read when in SGMII/serdes mode. This patch adds a check to
verify mode before reading and updating these statistics.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/igb/igb_main.c