From patchwork Sun Apr 25 17:45:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Chan X-Patchwork-Id: 427441 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.9 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, 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 5AB4EC433B4 for ; Sun, 25 Apr 2021 17:45:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3DE2B6102A for ; Sun, 25 Apr 2021 17:45:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231255AbhDYRqf (ORCPT ); Sun, 25 Apr 2021 13:46:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231205AbhDYRqa (ORCPT ); Sun, 25 Apr 2021 13:46:30 -0400 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77D87C061574 for ; Sun, 25 Apr 2021 10:45:50 -0700 (PDT) Received: by mail-pj1-x1031.google.com with SMTP id m6-20020a17090a8586b02901507e1acf0fso3939285pjn.3 for ; Sun, 25 Apr 2021 10:45:50 -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=Qfigrm7r04oaH6YFNnwWahR21K0YAokJ3gS5W7fvQzU=; b=ESyPOGDQjChVRFrqxaSADAaaec/N1fkr2aseZQD1XT38Ed/BdD0f+iCGnF1FxIAQTs 78hQX04VOGp0sA5QNAGa178xxq6hIQeCQVb30N/kDtzT7ozkT3kv7jHZawkfpEwy0sQW WRF1Jef5c44Su3Y/k5AOHhnBqnayjvuWSw/sY= 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=Qfigrm7r04oaH6YFNnwWahR21K0YAokJ3gS5W7fvQzU=; b=cnPsJwTKdsUhNPQTDmTB2VPUPaXb3b2RGzBIu+PsOUaigxJEL1GmcymKZT40dWsFkz hXp2kWDQnFaWbv4sCvA+PC5RrBOy0MffEwBqW2aLLSDUyUq6q7f9oRp8UR9jIv/axdsC UsT+pzet46EbD6PzRd09m3kqaV42qPANblUiQPrFrwjDtI5jx8d6imWcE/Lxkqvgi7aM 2I9lpQFWjm8+3UnpDCqcDYJgNStKCGK4pR2szaeaiIRziCmEoYSBgDFOEotWNpUXizDW LS++dokzxqKtJdFf4L8odkOeX5kiY16PhaMbZMGog5vdGgRRLZ1824h2lUo5dbXxgB0d WjJQ== X-Gm-Message-State: AOAM5316nDkp9SpbXTkgI2BbcyrbrXdGoxCPKeFMjJKOWSeuXO2AF3U2 Gye10ntpPudQQdbs0pn55u80+w== X-Google-Smtp-Source: ABdhPJwDACKUzCrX5Hrdc5/vZMeVmu3Wk/+erUULDVN3/yDt5fUEz4jP7ySyMOUCuDJaGqY5fCva5g== X-Received: by 2002:a17:90b:2353:: with SMTP id ms19mr3158023pjb.118.1619372749017; Sun, 25 Apr 2021 10:45:49 -0700 (PDT) Received: from localhost.swdvt.lab.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id t19sm14733553pjs.1.2021.04.25.10.45.48 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Apr 2021 10:45:48 -0700 (PDT) From: Michael Chan To: davem@davemloft.net Cc: netdev@vger.kernel.org, kuba@kernel.org, gospo@broadcom.com Subject: [PATCH net-next v2 05/10] bnxt_en: allow VF config ops when PF is closed Date: Sun, 25 Apr 2021 13:45:22 -0400 Message-Id: <1619372727-19187-6-git-send-email-michael.chan@broadcom.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1619372727-19187-1-git-send-email-michael.chan@broadcom.com> References: <1619372727-19187-1-git-send-email-michael.chan@broadcom.com> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.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;