common/sfc_efx/base: add mport alias MCDI wrappers
[dpdk.git] / drivers / common / sfc_efx / base / ef10_phy.c
index 3d07c25..954436b 100644 (file)
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  *
- * Copyright(c) 2019-2020 Xilinx, Inc.
+ * Copyright(c) 2019-2021 Xilinx, Inc.
  * Copyright(c) 2012-2019 Solarflare Communications Inc.
  */
 
@@ -530,8 +530,16 @@ ef10_phy_reconfigure(
 #endif
 
        rc = efx_mcdi_phy_set_led(enp, phy_led_mode);
-       if (rc != 0)
+       if (rc != 0) {
+               /*
+                * If LED control is not supported by firmware, we can
+                * silently ignore default mode set failure
+                * (see FWRIVERHD-198).
+                */
+               if (rc == EOPNOTSUPP && phy_led_mode == EFX_PHY_LED_DEFAULT)
+                       goto out;
                goto fail3;
+       }
 
 out:
        return (0);