linux/drivers/net/ethernet/intel/igb
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_82575.c igb: add flags to set eee advertisement mode 2014-09-06 05:00:39 -07:00
e1000_82575.h igb: add flags to set eee advertisement mode 2014-09-06 05:00:39 -07:00
e1000_defines.h igb: Workaround for i210 Errata 25: Slow System Clock 2014-07-10 01:48:28 -07:00
e1000_hw.h igb: remove blocking phy read from inside spinlock 2014-10-02 02:30:39 -07:00
e1000_i210.c igb: Workaround for i210 Errata 25: Slow System Clock 2014-07-10 01:48:28 -07:00
e1000_i210.h igb: Workaround for i210 Errata 25: Slow System Clock 2014-07-10 01:48:28 -07:00
e1000_mac.c igb: Cleanups to fix msleep warnings 2014-04-24 17:41:15 -07:00
e1000_mac.h igb: Cleanups to change comment style on license headers 2014-04-24 17:26:27 -07:00
e1000_mbx.c igb: Cleanups to change comment style on license headers 2014-04-24 17:26:27 -07:00
e1000_mbx.h igb: Cleanups to change comment style on license headers 2014-04-24 17:26:27 -07:00
e1000_nvm.c igb/ixgbe: remove return statements for void functions 2014-05-23 05:28:41 -07:00
e1000_nvm.h igb: Cleanups to change comment style on license headers 2014-04-24 17:26:27 -07:00
e1000_phy.c igb: remove redundant PHY power down register write 2014-05-27 02:10:44 -07:00
e1000_phy.h igb: remove redundant PHY power down register write 2014-05-27 02:10:44 -07:00
e1000_regs.h igb: Add message when malformed packets detected by hw 2014-07-24 03:00:37 -07:00
igb.h igb: remove blocking phy read from inside spinlock 2014-10-02 02:30:39 -07:00
igb_ethtool.c igb: add flags to set eee advertisement mode 2014-09-06 05:00:39 -07:00
igb_hwmon.c igb: Cleanups to change comment style on license headers 2014-04-24 17:26:27 -07:00
igb_main.c igb: remove blocking phy read from inside spinlock 2014-10-02 02:30:39 -07:00
igb_ptp.c igb: separate hardware setting from the set_ts_config ioctl 2014-06-11 08:45:55 -07:00
Makefile igb: Update license text to remove FSF address and update copyright. 2014-02-26 15:54:52 -05:00