Skip to content

Commit 47e1669

Browse files
ftang1Jeff Kirsher
authored and
Jeff Kirsher
committed
igb/igc: 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. Signed-off-by: Feng Tang <feng.tang@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Acked-by: Sasha Neftin <sasha.neftin@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
1 parent c7ae092 commit 47e1669

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

drivers/net/ethernet/intel/igb/igb_main.c

+1
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,7 @@ u32 igb_rd32(struct e1000_hw *hw, u32 reg)
753753
struct net_device *netdev = igb->netdev;
754754
hw->hw_addr = NULL;
755755
netdev_err(netdev, "PCIe link lost\n");
756+
WARN(1, "igb: Failed to read reg 0x%x!\n", reg);
756757
}
757758

758759
return value;

drivers/net/ethernet/intel/igc/igc_main.c

+1
Original file line numberDiff line numberDiff line change
@@ -3934,6 +3934,7 @@ u32 igc_rd32(struct igc_hw *hw, u32 reg)
39343934
hw->hw_addr = NULL;
39353935
netif_device_detach(netdev);
39363936
netdev_err(netdev, "PCIe link lost, device now detached\n");
3937+
WARN(1, "igc: Failed to read reg 0x%x!\n", reg);
39373938
}
39383939

39393940
return value;

0 commit comments

Comments
 (0)