提交 d3eef8c8 编写于 作者: C Carolyn Wyborny 提交者: Jeff Kirsher

igb: Add switch case for supported hardware to igb_ptp_remove.

PTP initialization is only done on supported parts, so remove needs
same checks or it will cause crashes on systems with igb devices that
don't support PTP.  This patch adds those checks to the exit function.
Signed-off-by: NCarolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: NJeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
上级 f00b0da7
......@@ -330,7 +330,17 @@ void igb_ptp_init(struct igb_adapter *adapter)
void igb_ptp_remove(struct igb_adapter *adapter)
{
cancel_delayed_work_sync(&adapter->overflow_work);
switch (adapter->hw.mac.type) {
case e1000_i211:
case e1000_i210:
case e1000_i350:
case e1000_82580:
case e1000_82576:
cancel_delayed_work_sync(&adapter->overflow_work);
break;
default:
return;
}
if (adapter->ptp_clock) {
ptp_clock_unregister(adapter->ptp_clock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册