From 9f91170773d852e65e4fc36e1f8173ce614f62e1 Mon Sep 17 00:00:00 2001 From: Don Skidmore Date: Fri, 3 Dec 2010 13:24:05 +0000 Subject: ixgbe: fix enum type mismatch on disable laser Fixes a recent bug on the patch (c6ecf39a10ceec3e97096e2a8d3eadcecd593422) that disabled the laser on ifconfig down. Compilers were seeing a enum mismatch. Signed-off-by Don Skidmore Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller --- drivers/net/ixgbe/ixgbe_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/net') diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index f97353cdb60..a12e86fccb0 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c @@ -3800,7 +3800,7 @@ static int ixgbe_up_complete(struct ixgbe_adapter *adapter) /* enable the optics for both mult-speed fiber and 82599 SFP+ fiber */ if (hw->mac.ops.enable_tx_laser && ((hw->phy.multispeed_fiber) || - ((hw->phy.type == ixgbe_media_type_fiber) && + ((hw->mac.ops.get_media_type(hw) == ixgbe_media_type_fiber) && (hw->mac.type == ixgbe_mac_82599EB)))) hw->mac.ops.enable_tx_laser(hw); @@ -4122,7 +4122,7 @@ void ixgbe_down(struct ixgbe_adapter *adapter) /* power down the optics for multispeed fiber and 82599 SFP+ fiber */ if (hw->mac.ops.disable_tx_laser && ((hw->phy.multispeed_fiber) || - ((hw->phy.type == ixgbe_media_type_fiber) && + ((hw->mac.ops.get_media_type(hw) == ixgbe_media_type_fiber) && (hw->mac.type == ixgbe_mac_82599EB)))) hw->mac.ops.disable_tx_laser(hw); @@ -7212,7 +7212,7 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, /* power down the optics for multispeed fiber and 82599 SFP+ fiber */ if (hw->mac.ops.disable_tx_laser && ((hw->phy.multispeed_fiber) || - ((hw->phy.type == ixgbe_media_type_fiber) && + ((hw->mac.ops.get_media_type(hw) == ixgbe_media_type_fiber) && (hw->mac.type == ixgbe_mac_82599EB)))) hw->mac.ops.disable_tx_laser(hw); -- cgit v1.2.3-18-g5258