|
Takashi Iwai |
917968 |
From 5c687b528a92f372d8c4528762d77d7f8a0b2e66 Mon Sep 17 00:00:00 2001
|
|
Takashi Iwai |
917968 |
From: Adrian Bunk <bunk@kernel.org>
|
|
Takashi Iwai |
917968 |
Date: Sun, 12 Sep 2021 22:05:23 +0300
|
|
Takashi Iwai |
917968 |
Subject: [PATCH] bnx2x: Fix enabling network interfaces without VFs
|
|
Takashi Iwai |
917968 |
Git-commit: 52ce14c134a003fee03d8fc57442c05a55b53715
|
|
Takashi Iwai |
917968 |
Patch-mainline: v5.15-rc2
|
|
Takashi Iwai |
917968 |
References: stable-5.14.7
|
|
Takashi Iwai |
917968 |
|
|
Takashi Iwai |
917968 |
commit 52ce14c134a003fee03d8fc57442c05a55b53715 upstream.
|
|
Takashi Iwai |
917968 |
|
|
Takashi Iwai |
917968 |
This function is called to enable SR-IOV when available,
|
|
Takashi Iwai |
917968 |
not enabling interfaces without VFs was a regression.
|
|
Takashi Iwai |
917968 |
|
|
Takashi Iwai |
917968 |
Fixes: 65161c35554f ("bnx2x: Fix missing error code in bnx2x_iov_init_one()")
|
|
Takashi Iwai |
917968 |
Signed-off-by: Adrian Bunk <bunk@kernel.org>
|
|
Takashi Iwai |
917968 |
Reported-by: YunQiang Su <wzssyqa@gmail.com>
|
|
Takashi Iwai |
917968 |
Tested-by: YunQiang Su <wzssyqa@gmail.com>
|
|
Takashi Iwai |
917968 |
Cc: stable@vger.kernel.org
|
|
Takashi Iwai |
917968 |
Acked-by: Shai Malin <smalin@marvell.com>
|
|
Takashi Iwai |
917968 |
Link: https://lore.kernel.org/r/20210912190523.27991-1-bunk@kernel.org
|
|
Takashi Iwai |
917968 |
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|
Takashi Iwai |
917968 |
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Takashi Iwai |
917968 |
Acked-by: Takashi Iwai <tiwai@suse.de>
|
|
Takashi Iwai |
917968 |
|
|
Takashi Iwai |
917968 |
---
|
|
Takashi Iwai |
917968 |
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 2 +-
|
|
Takashi Iwai |
917968 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
Takashi Iwai |
917968 |
|
|
Takashi Iwai |
917968 |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
|
|
Takashi Iwai |
917968 |
index 27943b0446c2..a207c36246b6 100644
|
|
Takashi Iwai |
917968 |
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
|
|
Takashi Iwai |
917968 |
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
|
|
Takashi Iwai |
917968 |
@@ -1224,7 +1224,7 @@ int bnx2x_iov_init_one(struct bnx2x *bp, int int_mode_param,
|
|
Takashi Iwai |
917968 |
|
|
Takashi Iwai |
917968 |
/* SR-IOV capability was enabled but there are no VFs*/
|
|
Takashi Iwai |
917968 |
if (iov->total == 0) {
|
|
Takashi Iwai |
917968 |
- err = -EINVAL;
|
|
Takashi Iwai |
917968 |
+ err = 0;
|
|
Takashi Iwai |
917968 |
goto failed;
|
|
Takashi Iwai |
917968 |
}
|
|
Takashi Iwai |
917968 |
|
|
Takashi Iwai |
917968 |
--
|
|
Takashi Iwai |
917968 |
2.26.2
|
|
Takashi Iwai |
917968 |
|