net/i40e: remove duplicate tunnel type check
[dpdk.git] / drivers / net / qede / base / ecore_dev.c
index e18c2fa..35a8394 100644 (file)
@@ -2358,6 +2358,7 @@ alloc_err:
 enum _ecore_status_t ecore_resc_alloc(struct ecore_dev *p_dev)
 {
        enum _ecore_status_t rc = ECORE_SUCCESS;
+       enum dbg_status debug_status = DBG_STATUS_OK;
        int i;
 
        if (IS_VF(p_dev)) {
@@ -2512,17 +2513,21 @@ enum _ecore_status_t ecore_resc_alloc(struct ecore_dev *p_dev)
                        goto alloc_err;
                }
 
-               rc = OSAL_DBG_ALLOC_USER_DATA(p_hwfn, &p_hwfn->dbg_user_info);
-               if (rc) {
+               debug_status = OSAL_DBG_ALLOC_USER_DATA(p_hwfn,
+                                                       &p_hwfn->dbg_user_info);
+               if (debug_status) {
                        DP_NOTICE(p_hwfn, false,
                                  "Failed to allocate dbg user info structure\n");
+                       rc = (enum _ecore_status_t)debug_status;
                        goto alloc_err;
                }
 
-               rc = OSAL_DBG_ALLOC_USER_DATA(p_hwfn, &p_hwfn->dbg_user_info);
-               if (rc) {
+               debug_status = OSAL_DBG_ALLOC_USER_DATA(p_hwfn,
+                                                       &p_hwfn->dbg_user_info);
+               if (debug_status) {
                        DP_NOTICE(p_hwfn, false,
                                  "Failed to allocate dbg user info structure\n");
+                       rc = (enum _ecore_status_t)debug_status;
                        goto alloc_err;
                }
        } /* hwfn loop */
@@ -6793,6 +6798,19 @@ void ecore_set_fw_mac_addr(__le16 *fw_msb,
        ((u8 *)fw_lsb)[1] = mac[4];
 }
 
+void ecore_set_platform_str(struct ecore_hwfn *p_hwfn,
+                           char *buf_str, u32 buf_size)
+{
+       u32 len;
+
+       OSAL_SNPRINTF(buf_str, buf_size, "Ecore %d.%d.%d.%d. ",
+                     ECORE_MAJOR_VERSION, ECORE_MINOR_VERSION,
+                     ECORE_REVISION_VERSION, ECORE_ENGINEERING_VERSION);
+
+       len = OSAL_STRLEN(buf_str);
+       OSAL_SET_PLATFORM_STR(p_hwfn, &buf_str[len], buf_size - len);
+}
+
 bool ecore_is_mf_fip_special(struct ecore_dev *p_dev)
 {
        return !!OSAL_GET_BIT(ECORE_MF_FIP_SPECIAL, &p_dev->mf_bits);