net/virtio: improve queue init error path
[dpdk.git] / drivers / net / i40e / base / i40e_adminq.c
index 0676f9a..0da45f0 100644 (file)
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #include "i40e_status.h"
@@ -598,6 +598,17 @@ STATIC void i40e_set_hw_flags(struct i40e_hw *hw)
                    (aq->api_maj_ver == 1 &&
                     aq->api_min_ver >= I40E_MINOR_VER_FW_LLDP_STOPPABLE_X722))
                        hw->flags |= I40E_HW_FLAG_FW_LLDP_STOPPABLE;
+
+               if (aq->api_maj_ver > 1 ||
+                   (aq->api_maj_ver == 1 &&
+                    aq->api_min_ver >= I40E_MINOR_VER_GET_LINK_INFO_X722))
+                       hw->flags |= I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE;
+
+               if (aq->api_maj_ver > 1 ||
+                   (aq->api_maj_ver == 1 &&
+                    aq->api_min_ver >= I40E_MINOR_VER_FW_REQUEST_FEC_X722))
+                       hw->flags |= I40E_HW_FLAG_X722_FEC_REQUEST_CAPABLE;
+
                /* fall through */
        default:
                break;
@@ -668,6 +679,10 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw)
        if (ret_code != I40E_SUCCESS)
                goto init_adminq_free_asq;
 
+       /* VF has no need of firmware */
+       if (i40e_is_vf(hw))
+               goto init_adminq_exit;
+
        /* There are some cases where the firmware may not be quite ready
         * for AdminQ operations, so we retry the AdminQ setup a few times
         * if we see timeouts in this first AQ call.