From: Ouyang Changchun Date: Thu, 12 Feb 2015 12:00:51 +0000 (+0800) Subject: ixgbe/base: fix mac type checks X-Git-Tag: spdx-start~9292 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=eb120fae84f24ace2b5241362322d262dd6c0007;p=dpdk.git ixgbe/base: fix mac type checks It needs '>=' rather than '=='. Signed-off-by: Changchun Ouyang Acked-by: Jijiang Liu --- diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c index ba5c8d8723..3bc1449811 100644 --- a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c +++ b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c @@ -4082,7 +4082,7 @@ s32 ixgbe_check_mac_link_generic(struct ixgbe_hw *hw, ixgbe_link_speed *speed, if ((links_reg & IXGBE_LINKS_SPEED_82599) == IXGBE_LINKS_SPEED_10G_82599) { *speed = IXGBE_LINK_SPEED_10GB_FULL; - if (hw->mac.type > ixgbe_mac_X550) { + if (hw->mac.type >= ixgbe_mac_X550) { if (links_reg & IXGBE_LINKS_SPEED_NON_STD) *speed = IXGBE_LINK_SPEED_2_5GB_FULL; } diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb_82599.c b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb_82599.c index 469db66bdc..9778164e1d 100644 --- a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb_82599.c +++ b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb_82599.c @@ -298,7 +298,7 @@ s32 ixgbe_dcb_config_pfc_82599(struct ixgbe_hw *hw, u8 pfc_en, u8 *map) */ reg &= ~(IXGBE_MFLCN_RPFCE_MASK | IXGBE_MFLCN_RFCE); - if (hw->mac.type == ixgbe_mac_X540) + if (hw->mac.type >= ixgbe_mac_X540) reg |= pfc_en << IXGBE_MFLCN_RPFCE_SHIFT; if (pfc_en)