aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/igc
diff options
context:
space:
mode:
authorFeng Tang <feng.tang@intel.com>2019-02-13 10:41:54 +0800
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2019-05-28 15:42:32 -0700
commit47e16692b26bf58420385be76d5aa17af383d4e2 (patch)
treee0eaf8e7310f4abea6b8e46297ed7b52a5dd2cbc /drivers/net/ethernet/intel/igc
parentfsl/fman: include IPSEC SPI in the Keygen extraction (diff)
downloadlinux-dev-47e16692b26bf58420385be76d5aa17af383d4e2.tar.xz
linux-dev-47e16692b26bf58420385be76d5aa17af383d4e2.zip
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>
Diffstat (limited to 'drivers/net/ethernet/intel/igc')
-rw-r--r--drivers/net/ethernet/intel/igc/igc_main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index 34fa0e60a780..28072b9aa932 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -3934,6 +3934,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!\n", reg);
}
return value;