OpenCloudOS-Kernel/drivers/net/ethernet/intel/igb
Kai-Heng Feng 165ae7a8fe igb: Report speed and duplex as unknown when device is runtime suspended
igb device gets runtime suspended when there's no link partner. We can't
get correct speed under that state:
$ cat /sys/class/net/enp3s0/speed
1000

In addition to that, an error can also be spotted in dmesg:
[  385.991957] igb 0000:03:00.0 enp3s0: PCIe link lost

Since device can only be runtime suspended when there's no link partner,
we can skip reading register and let the following logic set speed and
duplex with correct status.

The more generic approach will be wrap get_link_ksettings() with begin()
and complete() callbacks. However, for this particular issue, begin()
calls igb_runtime_resume() , which tries to rtnl_lock() while the lock
is already hold by upper ethtool layer.

So let's take this approach until the igb_runtime_resume() no longer
needs to hold rtnl_lock.

CC: stable <stable@vger.kernel.org>
Suggested-by: Alexander Duyck <alexander.duyck@gmail.com>
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2020-05-22 18:21:52 -07:00
..
Makefile net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
e1000_82575.c igb: Fix SGMII SFP module discovery for 100FX/LX. 2020-01-09 09:21:40 -08:00
e1000_82575.h igb: Add UDP segmentation offload support 2019-10-29 21:05:33 -07:00
e1000_defines.h igb: Fix WARN_ONCE on runtime suspend 2019-03-26 16:12:34 -07:00
e1000_hw.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
e1000_i210.c igb: fix uninitialized variables 2018-11-28 08:27:47 -08:00
e1000_i210.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
e1000_mac.c net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
e1000_mac.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
e1000_mbx.c net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
e1000_mbx.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
e1000_nvm.c net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
e1000_nvm.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
e1000_phy.c igb: e1000_phy: Mark expected switch fall-through 2018-08-07 17:54:20 -07:00
e1000_phy.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
e1000_regs.h igb: add RR2DCDELAY to ethtool registers dump 2019-06-28 16:00:06 -07:00
igb.h intel: Replace zero-length array with flexible-array member 2020-02-24 15:26:17 -08:00
igb_ethtool.c igb: Report speed and duplex as unknown when device is runtime suspended 2020-05-22 18:21:52 -07:00
igb_hwmon.c igb: convert to use i2c_new_client_device() 2020-03-26 19:31:21 -07:00
igb_main.c igb: dont drop packets if rx flow control is enabled 2019-12-31 11:17:25 -08:00
igb_ptp.c igb: Reject requests that fail to enable time stamping on both edges. 2019-11-15 12:48:32 -08:00