From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 7FE14A0096 for ; Sun, 2 Jun 2019 19:43:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 96F7D1B99B; Sun, 2 Jun 2019 19:43:18 +0200 (CEST) Received: from mail-yb1-f194.google.com (mail-yb1-f194.google.com [209.85.219.194]) by dpdk.org (Postfix) with ESMTP id E91671B945 for ; Sun, 2 Jun 2019 19:43:08 +0200 (CEST) Received: by mail-yb1-f194.google.com with SMTP id l66so5742088ybf.4 for ; Sun, 02 Jun 2019 10:43:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=yPRS7TztHgu/i1UxoC2uxGV/L2vThjyPyGOPjj8Qu9I=; b=Z9NUfiKveSLMjoOIEHFly9FdMUa4td5ra4M9931z17UePWoMrsCm7w2DEOWQ5toLcd aI1XSATWt+2lDQtXJROR+2J+FGvLmvArSWWi84b77t+ofymgiKhKpnoYojdDZI7puVE/ SAWQF36NLYk/VmF8l+GKUo+OLtdM/jCte9O8Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=yPRS7TztHgu/i1UxoC2uxGV/L2vThjyPyGOPjj8Qu9I=; b=H873NWzDMa6sVGqjkWGoDEj238P08AW1xf6IwCLP1Ox7CFUddF8CFwfaGsZ6IqkOUK tn9EeHer0NcJV6VCP5h5nr2CUo1Em1TBy2IZmCXde8rmi3G9TgIuoFYoQumt4ClRY3PW KOP/KBIfzlV0kGEPJJ73YJLWNrgiQSBQsj5JYIogM1qGe4ysVhEMtiuLSPaoEKqs3Bzw klb0rJE0PrMXIYMGwKw9t0UNvIqp+HhUS77HO0f3S4mMSPmM4ofO43KJdX8P/RlcEzHA kI+TZ0+jlB6pXUI+URfSGADHQky2KL1sgSKtyhbFgJKP4SWDJZUaGY2NTdujZBOUZaaa sDTw== X-Gm-Message-State: APjAAAUCB2zNzAXN0du7nqy9uNwPAh0OHsmAcrRWsMTh8mMktpkilg+0 U5SKHphqBgP+DC0Qvtpz0cDIHaOHC3rTDZztoCoCzGdtagpUFZUsKrjTDHJU3Ovx6xYR9Vgm3W+ +0lw8mFHF1eGnSbh4ews67EqqSGzffn0tNdUeeK4F7vrKtek12BhLaKQCpIAILcQ4 X-Google-Smtp-Source: APXvYqyRoq4gJdkUd1ns45E0F8NPZB3VYbja/RQG2t1VoSnIoFn2v4ASmKolRxevUv9hduWYy9Jb0Q== X-Received: by 2002:a25:af89:: with SMTP id g9mr10655955ybh.483.1559497388220; Sun, 02 Jun 2019 10:43:08 -0700 (PDT) Received: from lrichardson-VirtualBox.attlocal.net (69-218-223-106.lightspeed.rlghnc.sbcglobal.net. [69.218.223.106]) by smtp.gmail.com with ESMTPSA id n78sm1000819ywd.2.2019.06.02.10.43.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Jun 2019 10:43:07 -0700 (PDT) From: Lance Richardson To: dev@dpdk.org Cc: ajit.khaparde@broadcom.com, ferruh.yigit@intel.com, Lance Richardson Date: Sun, 2 Jun 2019 13:42:40 -0400 Message-Id: <20190602174247.32368-6-lance.richardson@broadcom.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190602174247.32368-1-lance.richardson@broadcom.com> References: <20190602174247.32368-1-lance.richardson@broadcom.com> Subject: [dpdk-dev] [PATCH 05/11] net/bnxt: reset function earlier in initialization 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" Move function reset to beginnng of initialization sequence. Signed-off-by: Lance Richardson Reviewed-by: Ajit Kumar Khaparde --- drivers/net/bnxt/bnxt_ethdev.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 30dff72a6..070262468 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -3484,6 +3484,14 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev) rc = bnxt_hwrm_ver_get(bp); if (rc) goto error_free; + + rc = bnxt_hwrm_func_reset(bp); + if (rc) { + PMD_DRV_LOG(ERR, "hwrm chip reset failure rc: %x\n", rc); + rc = -EIO; + goto error_free; + } + rc = bnxt_hwrm_queue_qportcfg(bp); if (rc) { PMD_DRV_LOG(ERR, "hwrm queue qportcfg failed\n"); @@ -3584,12 +3592,6 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev) pci_dev->mem_resource[0].phys_addr, pci_dev->mem_resource[0].addr); - rc = bnxt_hwrm_func_reset(bp); - if (rc) { - PMD_DRV_LOG(ERR, "hwrm chip reset failure rc: %x\n", rc); - rc = -EIO; - goto error_free; - } if (BNXT_PF(bp)) { //if (bp->pf.active_vfs) { -- 2.17.1