Received: by 2002:a05:6a10:6d25:0:0:0:0 with SMTP id gq37csp1241318pxb; Sun, 12 Sep 2021 12:16:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJzbcVL3IXHZyNEaJwAlFzjpGaUWORCAqT2qltu5ITrUQ77OVlVj6Ly2uovmhKk3QPHwaz X-Received: by 2002:a17:906:f289:: with SMTP id gu9mr8603819ejb.559.1631474219020; Sun, 12 Sep 2021 12:16:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631474219; cv=none; d=google.com; s=arc-20160816; b=YAVi8QjD03H7fIqt6JEIEXzzRIS/WmCUG6cjvbgGf8VgouW/AEFy0AVPiDR8rJS4c1 SKTBMOXy2w/jFvDtgRiKBmou+yqa2dJuouhCIgzLFFAjJ9Ol0ItqCeRmgjZakCm4e+IN vrXJQwbk1dOPyGj0d/M5Vjievopr/4eHA1w5I1PG0Q8xzXmoI45a/IvoS7uoxBX1jE0C MEpnHQLI7cXjjN8PP4+RuMF2S6eklzwqbkU+XfU/yS6/Qvt/0oPiG0fBHSdekRkNgz+g REK0j+BySe1SZpALr+DqqoHn15977+W2kXvN86OFoaVnon6Nm0cHdybs0KY98TRu34/G LaCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:to:from; bh=HCVWljnUNHdUYq71EGRg3lslFLHr6GesJ665SvRsBOY=; b=lZtLQxGPtC7N8yZA8CLjvM5hdWmVGBlxQtToL9EjOhpwucEpnt32FfxdZBfPSqPxE+ RlpZO83EqYLM8+NPpzGcBDna2RK4W6andqAQZN3TWXhWtpV8r/g28rEGodk8rFDFscrB S+QJ8I5ODf7T/C0SplFuKZv3/O/bzdaFwta++MzR7O25t8LcyFALI4umVAXxWksud0j3 HuU0SPqrs15sKGVN0nF5RkW1dReAcLMHe1UNgL8AuWFXx01BAyBu4+FnAA0MJ3pgVlnU 42U15xREfbP6OjzO7hDe4TDcgMBwxU7nClmBT0cWLYBFL9SvSXokPSCbqsqnre8Z4pM5 SEnA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e20si5049523edz.441.2021.09.12.12.16.33; Sun, 12 Sep 2021 12:16:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235785AbhILTQN (ORCPT + 99 others); Sun, 12 Sep 2021 15:16:13 -0400 Received: from mail.stusta.mhn.de ([141.84.69.5]:43654 "EHLO mail.stusta.mhn.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235302AbhILTQN (ORCPT ); Sun, 12 Sep 2021 15:16:13 -0400 X-Greylist: delayed 572 seconds by postgrey-1.27 at vger.kernel.org; Sun, 12 Sep 2021 15:16:12 EDT Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail.stusta.mhn.de (Postfix) with ESMTPSA id 4H6zZr2vlqz4p; Sun, 12 Sep 2021 21:05:23 +0200 (CEST) From: Adrian Bunk To: Ariel Elior , Sudarsana Kalluru , GR-everest-linux-l2@marvell.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] bnx2x: Fix enabling network interfaces without VFs Date: Sun, 12 Sep 2021 22:05:23 +0300 Message-Id: <20210912190523.27991-1-bunk@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This function is called to enable SR-IOV when available, not enabling interfaces without VFs was a regression. Fixes: 65161c35554f ("bnx2x: Fix missing error code in bnx2x_iov_init_one()") Signed-off-by: Adrian Bunk Reported-by: YunQiang Su Tested-by: YunQiang Su Cc: stable@vger.kernel.org --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c index f255fd0b16db..6fbf735fca31 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c @@ -1224,7 +1224,7 @@ int bnx2x_iov_init_one(struct bnx2x *bp, int int_mode_param, /* SR-IOV capability was enabled but there are no VFs*/ if (iov->total == 0) { - err = -EINVAL; + err = 0; goto failed; } -- 2.20.1