From: Paul Greenwalt <paul.greenw...@intel.com>

Found a typo in original implementation of ice_set_media_type,
where one of the checks for FIBER checks for C2C media type
instead of C2M. This results in failure of this check for some
AOC devices, consequently setting  the media type as AUI.
Bug was found in ethtool.

Fixes: e7bd7d54a26b ("net/ice/base: improve PHY media capabilities handling")
Cc: sta...@dpdk.org
Signed-off-by: Paul Greenwalt <paul.greenw...@intel.com>
Signed-off-by: Dhanya Pillai <dhanya.r.pil...@intel.com>
---
 drivers/net/intel/ice/base/ice_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/intel/ice/base/ice_common.c 
b/drivers/net/intel/ice/base/ice_common.c
index fce9b070cf..69070b740e 100644
--- a/drivers/net/intel/ice/base/ice_common.c
+++ b/drivers/net/intel/ice/base/ice_common.c
@@ -452,7 +452,7 @@ static void ice_set_media_type(struct ice_port_info *pi)
                 ((phy_type_low & ICE_MEDIA_OPT_PHY_TYPE_LOW_M ||
                   phy_type_high & ICE_MEDIA_OPT_PHY_TYPE_HIGH_M) &&
                  (phy_type_low & ICE_MEDIA_C2M_PHY_TYPE_LOW_M ||
-                  phy_type_high & ICE_MEDIA_C2C_PHY_TYPE_HIGH_M)))
+                  phy_type_high & ICE_MEDIA_C2M_PHY_TYPE_HIGH_M)))
                *media_type = ICE_MEDIA_FIBER;
        /* else if PHY types are only DA, or DA and C2C, then media type DA */
        else if (ice_phy_maps_to_media(phy_type_low, phy_type_high,
-- 
2.43.0

Reply via email to