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 05271b9 ]

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 bluca committed Mar 9, 2022
1 parent 38dee9e commit f0a4783
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions drivers/net/ixgbe/ixgbe_ethdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,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 f0a4783

Please sign in to comment.