From patchwork Fri Apr 26 02:31:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Chan X-Patchwork-Id: 1091184 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=broadcom.com header.i=@broadcom.com header.b="a4IvydKs"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 44qykN67Scz9s3l for ; Fri, 26 Apr 2019 12:32:12 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728764AbfDZCcL (ORCPT ); Thu, 25 Apr 2019 22:32:11 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:45517 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727370AbfDZCcI (ORCPT ); Thu, 25 Apr 2019 22:32:08 -0400 Received: by mail-pg1-f194.google.com with SMTP id y27so93110pgl.12 for ; Thu, 25 Apr 2019 19:32:07 -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=VVOWoUY/QI9QLkyr4f/b1PG42700hJd9VeVRznyA28k=; b=a4IvydKsOB4Nv1BWiTd7kglD9LgSjGJVqDnpJayljg97s6SfQotH16eXAElWb/vDVl kVyEoL/RSxtc7I/MF1A76RzADth7Yh/Ir4Fba1yS6mi7RJXn+faT81nhvx3apLGFGjAo 2C0uqpjOhHQ0rzSn7iZeqrDNLDFuy/lqdXxS0= 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=VVOWoUY/QI9QLkyr4f/b1PG42700hJd9VeVRznyA28k=; b=JfTZnqU8aPH0GIwYHOoy6erdOB/QCzdUlg4eRNVuwtVyTl8mx7f+saR9us7Rq1EU3k EboqZUFNxJYdZoAKbKFLSrSzBcu69FvOgK7KJKLGXgYrqFSXC/PEOmjSNVlQD8i4LLsS BlCBZtgm+ntiAhtVVO3bLZvq25rP/hAI/+IiI5/LYPogcXT6embwUaHjgHAKs+2nPw7w qe8rRrq3M5EQSHB3kiQ3KrTgJAZalObQvnhJ81b49DbGOwcBSdkuNxZPXekfKcQPRDgr ocS8dpiZAwHdpPedVzXvlK44qtobFLzqBO/4X3tCzdtRyLQkJElfH3ftTCrOeF6nC/P6 qk9Q== X-Gm-Message-State: APjAAAWEYaaY0cjHTi0k+M7JFiydoA7xIXQfBxPQROA3VZzXdFL52ayq X6q92tRkSJSdim5hORy+mMs3bQ== X-Google-Smtp-Source: APXvYqxUP+6Va3v2UV5knMqpRq9tG5FSwn+bRYcldfkCOq44InWxovyeaBO2Zmasno4o/s+7p2oXGw== X-Received: by 2002:a63:6888:: with SMTP id d130mr40919443pgc.451.1556245927143; Thu, 25 Apr 2019 19:32:07 -0700 (PDT) Received: from localhost.localdomain.dhcp.broadcom.net ([192.19.223.250]) by smtp.gmail.com with ESMTPSA id n5sm25690368pgp.80.2019.04.25.19.32.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Apr 2019 19:32:06 -0700 (PDT) From: Michael Chan To: davem@davemloft.net Cc: netdev@vger.kernel.org Subject: [PATCH net 5/6] bnxt_en: Fix statistics context reservation logic. Date: Thu, 25 Apr 2019 22:31:54 -0400 Message-Id: <1556245915-5430-6-git-send-email-michael.chan@broadcom.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1556245915-5430-1-git-send-email-michael.chan@broadcom.com> References: <1556245915-5430-1-git-send-email-michael.chan@broadcom.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org In an earlier commit that fixes the number of stats contexts to reserve for the RDMA driver, we added a function parameter to pass in the number of stats contexts to all the relevant functions. The passed in parameter should have been used to set the enables field of the firmware message. Fixes: 780baad44f0f ("bnxt_en: Reserve 1 stat_ctx for RDMA driver.") Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index a9172b2..b6cb7b8 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -5315,17 +5315,16 @@ __bnxt_hwrm_reserve_pf_rings(struct bnxt *bp, struct hwrm_func_cfg_input *req, req->num_tx_rings = cpu_to_le16(tx_rings); if (BNXT_NEW_RM(bp)) { enables |= rx_rings ? FUNC_CFG_REQ_ENABLES_NUM_RX_RINGS : 0; + enables |= stats ? FUNC_CFG_REQ_ENABLES_NUM_STAT_CTXS : 0; if (bp->flags & BNXT_FLAG_CHIP_P5) { enables |= cp_rings ? FUNC_CFG_REQ_ENABLES_NUM_MSIX : 0; enables |= tx_rings + ring_grps ? - FUNC_CFG_REQ_ENABLES_NUM_CMPL_RINGS | - FUNC_CFG_REQ_ENABLES_NUM_STAT_CTXS : 0; + FUNC_CFG_REQ_ENABLES_NUM_CMPL_RINGS : 0; enables |= rx_rings ? FUNC_CFG_REQ_ENABLES_NUM_RSSCOS_CTXS : 0; } else { enables |= cp_rings ? - FUNC_CFG_REQ_ENABLES_NUM_CMPL_RINGS | - FUNC_CFG_REQ_ENABLES_NUM_STAT_CTXS : 0; + FUNC_CFG_REQ_ENABLES_NUM_CMPL_RINGS : 0; enables |= ring_grps ? FUNC_CFG_REQ_ENABLES_NUM_HW_RING_GRPS | FUNC_CFG_REQ_ENABLES_NUM_RSSCOS_CTXS : 0; @@ -5365,14 +5364,13 @@ __bnxt_hwrm_reserve_vf_rings(struct bnxt *bp, enables |= tx_rings ? FUNC_VF_CFG_REQ_ENABLES_NUM_TX_RINGS : 0; enables |= rx_rings ? FUNC_VF_CFG_REQ_ENABLES_NUM_RX_RINGS | FUNC_VF_CFG_REQ_ENABLES_NUM_RSSCOS_CTXS : 0; + enables |= stats ? FUNC_VF_CFG_REQ_ENABLES_NUM_STAT_CTXS : 0; if (bp->flags & BNXT_FLAG_CHIP_P5) { enables |= tx_rings + ring_grps ? - FUNC_VF_CFG_REQ_ENABLES_NUM_CMPL_RINGS | - FUNC_VF_CFG_REQ_ENABLES_NUM_STAT_CTXS : 0; + FUNC_VF_CFG_REQ_ENABLES_NUM_CMPL_RINGS : 0; } else { enables |= cp_rings ? - FUNC_VF_CFG_REQ_ENABLES_NUM_CMPL_RINGS | - FUNC_VF_CFG_REQ_ENABLES_NUM_STAT_CTXS : 0; + FUNC_VF_CFG_REQ_ENABLES_NUM_CMPL_RINGS : 0; enables |= ring_grps ? FUNC_VF_CFG_REQ_ENABLES_NUM_HW_RING_GRPS : 0; }