ixgbe/base: fix mac type checks
authorOuyang Changchun <changchun.ouyang@intel.com>
Thu, 12 Feb 2015 12:00:51 +0000 (20:00 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 27 Apr 2015 08:05:58 +0000 (10:05 +0200)
It needs '>=' rather than '=='.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c
lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb_82599.c

index ba5c8d8..3bc1449 100644 (file)
@@ -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;
                }
index 469db66..9778164 100644 (file)
@@ -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)