diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2010-11-16 22:27:11 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2010-11-16 22:27:11 -0500 |
commit | e3de4b7bdfd2c06884c95cfb4ad4d64be046595e (patch) | |
tree | 50e0742a9f22170e21b2fe459a2e92c84df26721 /drivers/net/ixgbe | |
parent | 2274543f15133165b855b9a4a1503b2c1268c6cf (diff) |
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: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ixgbe')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 38dd85340352..def5c6e047cf 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -3661,7 +3661,7 @@ static int ixgbe_up_complete(struct ixgbe_adapter *adapter) | |||
3661 | ixgbe_configure_msi_and_legacy(adapter); | 3661 | ixgbe_configure_msi_and_legacy(adapter); |
3662 | 3662 | ||
3663 | /* enable the optics */ | 3663 | /* enable the optics */ |
3664 | if (hw->phy.multispeed_fiber) | 3664 | if (hw->phy.multispeed_fiber && hw->mac.ops.enable_tx_laser) |
3665 | hw->mac.ops.enable_tx_laser(hw); | 3665 | hw->mac.ops.enable_tx_laser(hw); |
3666 | 3666 | ||
3667 | clear_bit(__IXGBE_DOWN, &adapter->state); | 3667 | clear_bit(__IXGBE_DOWN, &adapter->state); |
@@ -3973,7 +3973,7 @@ void ixgbe_down(struct ixgbe_adapter *adapter) | |||
3973 | } | 3973 | } |
3974 | 3974 | ||
3975 | /* power down the optics */ | 3975 | /* power down the optics */ |
3976 | if (hw->phy.multispeed_fiber) | 3976 | if (hw->phy.multispeed_fiber && hw->mac.ops.disable_tx_laser) |
3977 | hw->mac.ops.disable_tx_laser(hw); | 3977 | hw->mac.ops.disable_tx_laser(hw); |
3978 | 3978 | ||
3979 | /* clear n-tuple filters that are cached */ | 3979 | /* clear n-tuple filters that are cached */ |
@@ -7074,7 +7074,7 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, | |||
7074 | } | 7074 | } |
7075 | 7075 | ||
7076 | /* power down the optics */ | 7076 | /* power down the optics */ |
7077 | if (hw->phy.multispeed_fiber) | 7077 | if (hw->phy.multispeed_fiber && hw->mac.ops.disable_tx_laser) |
7078 | hw->mac.ops.disable_tx_laser(hw); | 7078 | hw->mac.ops.disable_tx_laser(hw); |
7079 | 7079 | ||
7080 | init_timer(&adapter->watchdog_timer); | 7080 | init_timer(&adapter->watchdog_timer); |