intel-ethernet: warn when fatal read failure happens
Subsystems (3)
PATCH 1/1 intel-ethernet: warn when fatal read failure happens
Failed in read the HW register is very serious for igb/igc driver, as its hw_addr will be set to NULL and cause the adapter be seen as "REMOVED".
We saw the error only a few times in the MTBF test for suspend/resume, but can hardly get any useful info to debug.
Adding WARN() so that we can get the necessary information about where and how it happens, and use it for root causing and fixing this "PCIe link lost issue"
This affects igb, igc.
--- drivers/net/ethernet/intel/igb/igb_main.c | 1 + drivers/net/ethernet/intel/igc/igc_main.c | 1 + 2 files changed, 2 insertions(+)
drivers/net/ethernet/intel/igb/igb_main.c +1 -0
@@ -753,6 +753,7 @@ u32 igb_rd32(struct e1000_hw *hw, u32 reg)struct net_device *netdev = igb->netdev; hw->hw_addr =NULL ;netdev_err (netdev,"PCIe link lost\n" ); +WARN (1 ,"igb: Failed to read reg 0x%x!" , reg); }return value;
drivers/net/ethernet/intel/igc/igc_main.c +1 -0
@@ -3496,6 +3496,7 @@ u32 igc_rd32(struct igc_hw *hw, u32 reg) hw->hw_addr =NULL ;netif_device_detach (netdev);netdev_err (netdev,"PCIe link lost, device now detached\n" ); +WARN (1 ,"igc: Failed to read reg 0x%x!" , reg); }return value;
Signature · 1 line
2.7.4
Neftin
PATCH 1/1 intel-ethernet: warn when fatal read failure happens
Quoted 36 lines · Feng Tang
Failed in read the HW register is very serious for igb/igc driver, as its
hw_addrwill be set to NULL and cause the adapter be seen as "REMOVED".We saw the error only a few times in the MTBF test for suspend/resume, but can hardly get any useful info to debug.
Adding
WARN()so that we can get the necessary information about where and how it happens, and use it for root causing and fixing this "PCIe link lost issue"This affects igb, igc.
Signed-off-by Feng Tang <[email protected]>--- drivers/net/ethernet/intel/igb/igb_main.c | 1 + drivers/net/ethernet/intel/igc/igc_main.c | 1 + 2 files changed, 2 insertions(+)drivers/net/ethernet/intel/igb/igb_main.c +1
-0@@ -753,6 +753,7 @@ u32 igb_rd32(struct e1000_hw *hw, u32 reg)struct net_device *netdev = igb->netdev; hw->hw_addr =NULL ;netdev_err (netdev,"PCIe link lost\n" ); +WARN (1 ,"igb: Failed to read reg 0x%x!" , reg); }return value;drivers/net/ethernet/intel/igc/igc_main.c +0
-0
drivers/net/ethernet/intel/igc/igc_main.c u32 igc_rd32(struct igc_hw *hw, u32 reg) · line 3499
Quoted 4 lines
drivers/net/ethernet/intel/igc/igc_main.c +1
-0@@ -3496,6 +3496,7 @@ u32 igc_rd32(struct igc_hw *hw, u32 reg) hw->hw_addr =NULL ;netif_device_detach (netdev);netdev_err (netdev,"PCIe link lost, device now detached\n" ); +WARN (1 ,"igc: Failed to read reg 0x%x!" , reg);
Looks good. Small suggestion: add end of the line "\n" WARN(1, "igc: Failed to read reg 0x%x!\n", reg);
drivers/net/ethernet/intel/igc/igc_main.c u32 igc_rd32(struct igc_hw *hw, u32 reg) · line 3502
Quoted 4 lines
drivers/net/ethernet/intel/igc/igc_main.c +0
-0}return value;
Sasha
Brown
PATCH 1/1 intel-ethernet: warn when fatal read failure happens
Quoted 7 lines
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf Of Neftin, Sasha
Sent: Thursday, January 10, 2019 12:19 AM
To: intel-wired-lan at osuosl.org
Subject: Re: [Intel-wired-lan] [PATCH] intel-ethernet: warn when fatal read failure happens
Quoted 19 lines
Quoted 18 lines · Feng Tang
Failed in read the HW register is very serious for igb/igc driver, as its
hw_addrwill be set to NULL and cause the adapter be seen as "REMOVED".We saw the error only a few times in the MTBF test for suspend/resume, but can hardly get any useful info to debug.
Adding
WARN()so that we can get the necessary information about where and how it happens, and use it for root causing and fixing this "PCIe link lost issue"This affects igb, igc.
Signed-off-by Feng Tang <[email protected]>--- drivers/net/ethernet/intel/igb/igb_main.c | 1 + drivers/net/ethernet/intel/igc/igc_main.c | 1 + 2 files changed, 2 insertions(+)
With the caveat of recognizing Sasha's suggestion to add a "\n"...