From: Stephen Douthit Date: Mon, 28 Feb 2022 15:29:35 +0000 (-0500) Subject: net/ixgbe: fix FSP check for X550EM devices X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=05271b99a93ae306fe4abe09fa561f0220469724;p=dpdk.git net/ixgbe: fix FSP check for X550EM devices 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: 0790adeb5675 ("ixgbe/base: support X550em_a device") Cc: stable@dpdk.org Signed-off-by: Stephen Douthit Signed-off-by: Jeff Daly Acked-by: Haiyue Wang --- diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 7643842560..2da3f67bbc 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -781,6 +781,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; } }