From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id CD3FFA0353; Tue, 19 Nov 2019 19:57:11 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9F9A42BF5; Tue, 19 Nov 2019 19:57:00 +0100 (CET) Received: from rnd-relay.smtp.broadcom.com (rnd-relay.smtp.broadcom.com [192.19.229.170]) by dpdk.org (Postfix) with ESMTP id 7D822CF3; Tue, 19 Nov 2019 19:56:51 +0100 (CET) Received: from mail-irv-17.broadcom.com (mail-irv-17.lvn.broadcom.net [10.75.242.48]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id E4BF130C0D5; Tue, 19 Nov 2019 10:53:18 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com E4BF130C0D5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1574189598; bh=qjDte1q5CPtH6KjAI3HqzOYoW+ajYuUF+62K/jzzgP0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NNkbfchm4mwJIf4+fG/2AWSrdyXvVLGupfKyCAv1RNUGIeelUnlBxO4iSMHmQVx4K dP2ud7wOKfl9Skc59wdwE9NVHm8aVff/Ov+hx+PzcuxkqxniJJUm7dgemRjN2Nrz3w /s0DYrgFg+IDcLET2LxjYmVVHETyVGJ6ChRkLlSk= Received: from C02VPB22HTD6.wifi.broadcom.net (c02vpb22htd6.wifi.broadcom.net [10.69.74.102]) by mail-irv-17.broadcom.com (Postfix) with ESMTP id 30B0114008B; Tue, 19 Nov 2019 10:56:47 -0800 (PST) From: Ajit Khaparde To: dev@dpdk.org Cc: ferruh.yigit@intel.com, stable@dpdk.org, Somnath Kotur Date: Tue, 19 Nov 2019 10:56:36 -0800 Message-Id: <20191119185638.78740-2-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.21.0 (Apple Git-122.2) In-Reply-To: <20191119185638.78740-1-ajit.khaparde@broadcom.com> References: <20191119185638.78740-1-ajit.khaparde@broadcom.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 1/3] net/bnxt: fix to ignore resource qcaps error with older FW X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On some old versions of FW, bnxt_hwrm_func_resc_qcaps can return an error. This is because the command was not implemented completely in FW till the subsequent version. Ignore the error and continue with the driver initialization. Fixes: edafb57ba4a1 ("net/bnxt: fix VF resource allocation") Cc: stable@dpdk.org Signed-off-by: Ajit Khaparde Reviewed-by: Somnath Kotur --- drivers/net/bnxt/bnxt_hwrm.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index 2cba007ea..1d3732eee 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -692,7 +692,12 @@ int bnxt_hwrm_func_qcaps(struct bnxt *bp) bp->flags |= BNXT_FLAG_NEW_RM; } - return rc; + /* On older FW, + * bnxt_hwrm_func_resc_qcaps can fail and cause init failure. + * But the error can be ignored. Return success. + */ + + return 0; } /* VNIC cap covers capability of all VNICs. So no need to pass vnic_id */ @@ -901,7 +906,7 @@ int bnxt_hwrm_func_resc_qcaps(struct bnxt *bp) rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB); - HWRM_CHECK_RESULT(); + HWRM_CHECK_RESULT_SILENT(); if (BNXT_VF(bp)) { bp->max_rsscos_ctx = rte_le_to_cpu_16(resp->max_rsscos_ctx); -- 2.21.0 (Apple Git-122.2)