Commit 19343de2 authored by Don Skidmore's avatar Don Skidmore Committed by David S. Miller

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: default avatarPeter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: default avatarDon Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 63d6e1d8
...@@ -2697,19 +2697,23 @@ static int ixgbe_up_complete(struct ixgbe_adapter *adapter) ...@@ -2697,19 +2697,23 @@ static int ixgbe_up_complete(struct ixgbe_adapter *adapter)
/* /*
* For hot-pluggable SFP+ devices, a new SFP+ module may have * For hot-pluggable SFP+ devices, a new SFP+ module may have
* arrived before interrupts were enabled. We need to kick off * arrived before interrupts were enabled but after probe. Such
* the SFP+ module setup first, then try to bring up link. * devices wouldn't have their type identified yet. We need to
* kick off the SFP+ module setup first, then try to bring up link.
* If we're not hot-pluggable SFP+, we just need to configure link * If we're not hot-pluggable SFP+, we just need to configure link
* and bring it up. * and bring it up.
*/ */
err = hw->phy.ops.identify(hw); if (hw->phy.type == ixgbe_phy_unknown) {
if (err == IXGBE_ERR_SFP_NOT_SUPPORTED) { err = hw->phy.ops.identify(hw);
dev_err(&adapter->pdev->dev, "failed to initialize because " if (err == IXGBE_ERR_SFP_NOT_SUPPORTED) {
"an unsupported SFP+ module type was detected.\n" dev_err(&adapter->pdev->dev, "failed to initialize "
"Reload the driver after installing a supported " "because an unsupported SFP+ module type "
"module.\n"); "was detected.\n"
ixgbe_down(adapter); "Reload the driver after installing a "
return err; "supported module.\n");
ixgbe_down(adapter);
return err;
}
} }
if (ixgbe_is_sfp(hw)) { if (ixgbe_is_sfp(hw)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment