From patchwork Mon Nov 16 00:27:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Chan X-Patchwork-Id: 11907001 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,MIME_HEADER_CTYPE_ONLY,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,T_TVD_MIME_NO_HEADERS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0D7B3C63777 for ; Mon, 16 Nov 2020 00:28:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B60BA22453 for ; Mon, 16 Nov 2020 00:28:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="FYLox68P" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728268AbgKPA2V (ORCPT ); Sun, 15 Nov 2020 19:28:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726311AbgKPA2V (ORCPT ); Sun, 15 Nov 2020 19:28:21 -0500 Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 661FBC0613CF for ; Sun, 15 Nov 2020 16:28:21 -0800 (PST) Received: by mail-pl1-x62d.google.com with SMTP id b3so7363591pls.11 for ; Sun, 15 Nov 2020 16:28:21 -0800 (PST) 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=wZg4N1OroWqzJ2KATpMjhmsnCL6QQ1tG206kDMGQNOE=; b=FYLox68P+SoWDMuX81EZoRa0WLniufwg6kdP1XOze6qMf51HfjEKMjtygr0+R63E3c uP8+P4DoYIqLuA2eeq/BrFiV/nOI4vsd784DCShz+zSJ47GUtWowzPXRwGzLNxtWolx5 2fUBAhTy0g5lc5ViBIj2I7HU0F6gPjbcWxMSI= 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=wZg4N1OroWqzJ2KATpMjhmsnCL6QQ1tG206kDMGQNOE=; b=enVTs5m4z37oipBJRd4wH1qeDnUAFnzq5gaFKH6NFKydaJ2IcFpVk33ixcI463YST2 +9VMMrjqKtwImBmmafxmgDa1M3waIdgDKDlax2T474C9hLBB/U1o1fnSt9+uuWRCZLQ3 dXrlEL8n2zdQv1mdSBqg6bqydBuXcdsu25epH3+SYNVBRBegS52CwnquZt4iiXzQM6Sg /2M8BaBzgIOTy3CoVVjiG2cnLWWDpt5aoizRJGQP3Ffc+NiIvpiDQE5yFgnTBSl0sc2G hRUkntdhprz5pHSmyOYc6qAfpwwB53w5v6nBiyRmAngVlevgbklfhupd3pp0fbdwg/0r uzUw== X-Gm-Message-State: AOAM531vlGfdChFcasiEFqN5rXS9Z7PdIONHkd9SdI1gajxFQyErgvo/ akrDaXG9hr3efykeZAVv2Z+I2TmzMCInBQ== X-Google-Smtp-Source: ABdhPJxnUyb+AoDHwZATq7fXcmxBAkNMOVhgXppel5nZNlbM8Lv3z3KMhUHi4KpsHwYH+XwcNDzXug== X-Received: by 2002:a17:902:900a:b029:d7:d966:4f29 with SMTP id a10-20020a170902900ab02900d7d9664f29mr10565293plp.85.1605486500656; Sun, 15 Nov 2020 16:28:20 -0800 (PST) Received: from localhost.swdvt.lab.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id i19sm2942563pgk.44.2020.11.15.16.28.18 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Nov 2020 16:28:20 -0800 (PST) From: Michael Chan To: kuba@kernel.org Cc: netdev@vger.kernel.org, gospo@broadcom.com Subject: [PATCH net 4/4] bnxt_en: Avoid unnecessary NVM_GET_DEV_INFO cmd error log on VFs. Date: Sun, 15 Nov 2020 19:27:52 -0500 Message-Id: <1605486472-28156-5-git-send-email-michael.chan@broadcom.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1605486472-28156-1-git-send-email-michael.chan@broadcom.com> References: <1605486472-28156-1-git-send-email-michael.chan@broadcom.com> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Vasundhara Volam VFs do not have access permissions to issue NVM_GET_DEV_INFO firmware command. Fixes: 4933f6753b50 ("bnxt_en: Add bnxt_hwrm_nvm_get_dev_info() to query NVM info.") Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c index f133ea5674cb..1471c9a36238 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c @@ -2079,6 +2079,9 @@ int bnxt_hwrm_nvm_get_dev_info(struct bnxt *bp, struct hwrm_nvm_get_dev_info_input req = {0}; int rc; + if (BNXT_VF(bp)) + return -EOPNOTSUPP; + bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_NVM_GET_DEV_INFO, -1, -1); mutex_lock(&bp->hwrm_cmd_lock); rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT);