From patchwork Sat Apr 24 20:14:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Chan X-Patchwork-Id: 12222771 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=-18.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,MIME_HEADER_CTYPE_ONLY, SPF_HELO_NONE,SPF_PASS,T_TVD_MIME_NO_HEADERS,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 5D5B2C433B4 for ; Sat, 24 Apr 2021 20:14:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 407BA61462 for ; Sat, 24 Apr 2021 20:14:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236508AbhDXUPb (ORCPT ); Sat, 24 Apr 2021 16:15:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237262AbhDXUP0 (ORCPT ); Sat, 24 Apr 2021 16:15:26 -0400 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4941AC06174A for ; Sat, 24 Apr 2021 13:14:47 -0700 (PDT) Received: by mail-pl1-x631.google.com with SMTP id s20so11056524plr.13 for ; Sat, 24 Apr 2021 13:14:47 -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=vXRv6LB0NtHdt36Le3VINVXDJ1qxk2E0aeiMKn1xvdM=; b=gsm/JmfORCWxs+L0DJhHrN1Lcc2sBYRbJZX5Z0gmH1WmY4wHYwPnGFyEIVSgn5Q/3N zd5rQAAeGO9UkUJhGJCHRGBfNmPobPsa675Glijh9z0vdwkLL1isqmcK9c/sFaXKuoTG oiRQiYWMxUhn3BygOyjBssMe8ThfYbEfQWWSQ= 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=vXRv6LB0NtHdt36Le3VINVXDJ1qxk2E0aeiMKn1xvdM=; b=pwb1OfzQC9q8067d4t1JRDyUBPzZz7DGT2HSDXSPXrjhWUjUHNeS/i+gDs5H7Tuf5n uDj4oXugJavCxhr1qu/pnCZK3QHugQDj7XUa5UviDIY7alnXasIyHva+rhp5WicXbsPd ADO1nWGtiTF0+2UmUgvLJQtJ6I47VYg9BXlA9gljr2mXfF1G8UF3y30j9u00oDAztg3g QprSgDPD+ypzEzRtgwqpix0pSF9ro155IzaPW4X6SwY8P/jVAnEhX3EzRhkzjw1a0iyO +qZAOXxppNhFlsJMfe6xmBb4Hu+0HKEZfLgMlaocnFPVydGlN52+o3y9qOxuiqasCeAM OthA== X-Gm-Message-State: AOAM533/Rha5vdREapQVqTK9w6ZGbHn1VWOXyrHVaul1UHSUrUqnzAiL 0nQTklfW74Hc8dhXWPPzG0ouyg== X-Google-Smtp-Source: ABdhPJymXI2OtSGWcmrZHVLbcv5gNjxuyefn9Rg1+E7fejPzVlnqMq8r96ODSf/5XcwSolVrAkuldA== X-Received: by 2002:a17:902:d2c3:b029:ec:b1ce:c488 with SMTP id n3-20020a170902d2c3b02900ecb1cec488mr10399402plc.4.1619295286630; Sat, 24 Apr 2021 13:14:46 -0700 (PDT) Received: from localhost.swdvt.lab.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id z29sm7914070pga.52.2021.04.24.13.14.45 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 24 Apr 2021 13:14:46 -0700 (PDT) From: Michael Chan To: davem@davemloft.net Cc: netdev@vger.kernel.org, kuba@kernel.org, gospo@broadcom.com Subject: [PATCH net-next 05/10] bnxt_en: allow VF config ops when PF is closed Date: Sat, 24 Apr 2021 16:14:26 -0400 Message-Id: <1619295271-30853-6-git-send-email-michael.chan@broadcom.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1619295271-30853-1-git-send-email-michael.chan@broadcom.com> References: <1619295271-30853-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: Edwin Peer It is perfectly legal for the stack to query and configure VFs via PF NDOs while the NIC is administratively down. Remove the unnecessary check for the PF to be in open state. Signed-off-by: Edwin Peer Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c index 4da52f812585..67856dbf9ce9 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c @@ -49,10 +49,6 @@ static int bnxt_hwrm_fwd_async_event_cmpl(struct bnxt *bp, static int bnxt_vf_ndo_prep(struct bnxt *bp, int vf_id) { - if (!test_bit(BNXT_STATE_OPEN, &bp->state)) { - netdev_err(bp->dev, "vf ndo called though PF is down\n"); - return -EINVAL; - } if (!bp->pf.active_vfs) { netdev_err(bp->dev, "vf ndo called though sriov is disabled\n"); return -EINVAL;