提交 e3de4b7b 编写于 作者: A Alexander Duyck 提交者: Jeff Kirsher

ixgbe: Resolve null function pointer accesses on 82598 w/ multi-speed fiber

This change resolves some null function pointer accesses on 82598 when a
multi-speed fiber module is inserted into the adapter.
Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
Tested-by: NRoss Brattain <ross.b.brattain@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
上级 2274543f
......@@ -3661,7 +3661,7 @@ static int ixgbe_up_complete(struct ixgbe_adapter *adapter)
ixgbe_configure_msi_and_legacy(adapter);
/* enable the optics */
if (hw->phy.multispeed_fiber)
if (hw->phy.multispeed_fiber && hw->mac.ops.enable_tx_laser)
hw->mac.ops.enable_tx_laser(hw);
clear_bit(__IXGBE_DOWN, &adapter->state);
......@@ -3973,7 +3973,7 @@ void ixgbe_down(struct ixgbe_adapter *adapter)
}
/* power down the optics */
if (hw->phy.multispeed_fiber)
if (hw->phy.multispeed_fiber && hw->mac.ops.disable_tx_laser)
hw->mac.ops.disable_tx_laser(hw);
/* clear n-tuple filters that are cached */
......@@ -7074,7 +7074,7 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
}
/* power down the optics */
if (hw->phy.multispeed_fiber)
if (hw->phy.multispeed_fiber && hw->mac.ops.disable_tx_laser)
hw->mac.ops.disable_tx_laser(hw);
init_timer(&adapter->watchdog_timer);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册