Skip to content

Commit

Permalink
net/ixgbe: fix FSP check for X550EM devices
Browse files Browse the repository at this point in the history
[ upstream commit 05271b99a93ae306fe4abe09fa561f0220469724 ]

Currently all X500EM* MAC types fall through to the default case and get
reported as non-SFP regardless of media type, which isn't correct.

Fixes: 0790ade ("ixgbe/base: support X550em_a device")

Signed-off-by: Stephen Douthit <stephend@silicom-usa.com>
Signed-off-by: Jeff Daly <jeffd@silicom-usa.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
  • Loading branch information
ADIsdouthit authored and cpaelzer committed Mar 9, 2022
1 parent b66b96e commit 5243c1d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions drivers/net/ixgbe/ixgbe_ethdev.c
Expand Up @@ -834,6 +834,20 @@ ixgbe_is_sfp(struct ixgbe_hw *hw)
case ixgbe_phy_sfp_passive_unknown:
return 1;
default:
/* x550em devices may be SFP, check media type */
switch (hw->mac.type) {
case ixgbe_mac_X550EM_x:
case ixgbe_mac_X550EM_a:
switch (ixgbe_get_media_type(hw)) {
case ixgbe_media_type_fiber:
case ixgbe_media_type_fiber_qsfp:
return 1;
default:
break;
}
default:
break;
}
return 0;
}
}
Expand Down

0 comments on commit 5243c1d

Please sign in to comment.