diff options
author | Don Skidmore <donald.c.skidmore@intel.com> | 2009-07-02 08:50:31 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-07-03 22:11:00 -0400 |
commit | 19343de279d28e4ed039c8ad00510d19dc4d6d12 (patch) | |
tree | 57b7cf0980ec1c887e48d616b97f1ae158933345 | |
parent | 63d6e1d80a8c3118be2ca0f1f21ba883f282060c (diff) |
ixgbe: fix regression on some 82598 adapters
The change to check the SFP+ module again on open() was
causing the XFP (non-SFP+) adapters to be rejected. We
only want to try and re-identify the SFP+ module if the
original probe found that this device was an SFP+ device.
So for this code path (driver loaded with SFP module, module
inserted, ifconfig up of the device) the type will be
ixgbe_phy_unknown for an unidentified SFP+ module. So we
only check if that is the case.
This problem also shows up on Copper devices.
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index aaf482c0d520..cf39f5a47037 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -2697,19 +2697,23 @@ static int ixgbe_up_complete(struct ixgbe_adapter *adapter) | |||
2697 | 2697 | ||
2698 | /* | 2698 | /* |
2699 | * For hot-pluggable SFP+ devices, a new SFP+ module may have | 2699 | * For hot-pluggable SFP+ devices, a new SFP+ module may have |
2700 | * arrived before interrupts were enabled. We need to kick off | 2700 | * arrived before interrupts were enabled but after probe. Such |
2701 | * the SFP+ module setup first, then try to bring up link. | 2701 | * devices wouldn't have their type identified yet. We need to |
2702 | * kick off the SFP+ module setup first, then try to bring up link. | ||
2702 | * If we're not hot-pluggable SFP+, we just need to configure link | 2703 | * If we're not hot-pluggable SFP+, we just need to configure link |
2703 | * and bring it up. | 2704 | * and bring it up. |
2704 | */ | 2705 | */ |
2705 | err = hw->phy.ops.identify(hw); | 2706 | if (hw->phy.type == ixgbe_phy_unknown) { |
2706 | if (err == IXGBE_ERR_SFP_NOT_SUPPORTED) { | 2707 | err = hw->phy.ops.identify(hw); |
2707 | dev_err(&adapter->pdev->dev, "failed to initialize because " | 2708 | if (err == IXGBE_ERR_SFP_NOT_SUPPORTED) { |
2708 | "an unsupported SFP+ module type was detected.\n" | 2709 | dev_err(&adapter->pdev->dev, "failed to initialize " |
2709 | "Reload the driver after installing a supported " | 2710 | "because an unsupported SFP+ module type " |
2710 | "module.\n"); | 2711 | "was detected.\n" |
2711 | ixgbe_down(adapter); | 2712 | "Reload the driver after installing a " |
2712 | return err; | 2713 | "supported module.\n"); |
2714 | ixgbe_down(adapter); | ||
2715 | return err; | ||
2716 | } | ||
2713 | } | 2717 | } |
2714 | 2718 | ||
2715 | if (ixgbe_is_sfp(hw)) { | 2719 | if (ixgbe_is_sfp(hw)) { |