提交 47e16692 编写于 作者: F Feng Tang 提交者: Jeff Kirsher

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: NFeng Tang <feng.tang@intel.com>
Tested-by: NAaron Brown <aaron.f.brown@intel.com>
Acked-by: NSasha Neftin <sasha.neftin@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
上级 c7ae0925
...@@ -753,6 +753,7 @@ u32 igb_rd32(struct e1000_hw *hw, u32 reg) ...@@ -753,6 +753,7 @@ u32 igb_rd32(struct e1000_hw *hw, u32 reg)
struct net_device *netdev = igb->netdev; struct net_device *netdev = igb->netdev;
hw->hw_addr = NULL; hw->hw_addr = NULL;
netdev_err(netdev, "PCIe link lost\n"); netdev_err(netdev, "PCIe link lost\n");
WARN(1, "igb: Failed to read reg 0x%x!\n", reg);
} }
return value; return value;
......
...@@ -3934,6 +3934,7 @@ u32 igc_rd32(struct igc_hw *hw, u32 reg) ...@@ -3934,6 +3934,7 @@ u32 igc_rd32(struct igc_hw *hw, u32 reg)
hw->hw_addr = NULL; hw->hw_addr = NULL;
netif_device_detach(netdev); netif_device_detach(netdev);
netdev_err(netdev, "PCIe link lost, device now detached\n"); netdev_err(netdev, "PCIe link lost, device now detached\n");
WARN(1, "igc: Failed to read reg 0x%x!\n", reg);
} }
return value; return value;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册