linux/drivers/net/ethernet/intel
Bernhard Kaindl 7acf631889 igb: remove blocking phy read from inside spinlock
Remove a source of latency spikes (in my case up to 10ms) by not calling
code that uses mdelay() for feeding a phy statistic (rx errors for idle
symbols - not data -> idle_errors) while being called with a spinlock held.

As idle_errors isn't read, this patch only removes unused code and data.

Later, more complicated changes may be applied to address the spinlock and
allow for some PHY diagnostics by harvesting this PHY stats register fully.

This patch is designed to fix the issue and be safe for longterm/stable.

For the Intel e1000e driver, the same change was applied in 2008 with
commit 23033fad5b ("e1000e: remove phy read from inside spinlock").

The mdelay is triggered by HW/SW semaphores, thus it depends on the HW.

I've HW that triggers it even when idle. Others may trigger it only e.g.
when Ethernet ports aquire or loose the link or on ifconfig up / down.
We've noticed this first from delays in frame rx/tx due to the mdelay().

Example command for checking if the issue is triggered: cyclictest -Smp1
(Look for occasional "Max:" values > 4000 or use -b 4000 to stop if greater)

It was observed with I350 ports connected to other I350 ports, but not
if driver and EEPROM was modified to run the I350 in EEPROM-less mode.

phy_stats.idle_errors and .receive_errors (isn't touched) occupy 64 not
used bits in the adapter struct: Their allocation may be removed as well.

Cc: Carolyn Wyborny <carolyn.wyborny@intel.com>
Cc: Todd Fujinaka <todd.fujinaka@intel.com>
Fixes: 12dcd86b75 ("igb: fix stats handling") (this added the spin_lock)
Signed-off-by: Bernhard Kaindl <bk-linux@use.startmail.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-10-02 02:30:39 -07:00
..
e1000 e1000: switch to napi_gro_frags api 2014-09-12 02:24:49 -07:00
e1000e e1000e: Fix TSO with non-accelerated vlans 2014-08-25 17:27:09 -07:00
fm10k fm10k: Correctly set the number of Tx queues 2014-10-01 23:42:55 -07:00
i40e Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-09-07 21:41:53 -07:00
i40evf Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-09-07 21:41:53 -07:00
igb igb: remove blocking phy read from inside spinlock 2014-10-02 02:30:39 -07:00
igbvf PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use 2014-08-12 12:15:14 -06:00
ixgb PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use 2014-08-12 12:15:14 -06:00
ixgbe ixgbe: delete one duplicate marcro definition of IXGBE_MAX_L2A_QUEUES 2014-10-02 02:24:08 -07:00
ixgbevf ixgbevf: remove useless bd_number from struct ixgbevf_adapter 2014-09-18 02:59:27 -07:00
e100.c PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use 2014-08-12 12:15:14 -06:00
Kconfig fm10k: Add skeletal frame for Intel(R) FM10000 Ethernet Switch Host Interface Driver 2014-09-23 03:59:13 -07:00
Makefile fm10k: Add skeletal frame for Intel(R) FM10000 Ethernet Switch Host Interface Driver 2014-09-23 03:59:13 -07:00