Skip to content

Commit

Permalink
bnx2x: Fix enabling network interfaces without VFs
Browse files Browse the repository at this point in the history
This function is called to enable SR-IOV when available,
not enabling interfaces without VFs was a regression.

Fixes: 65161c3 ("bnx2x: Fix missing error code in bnx2x_iov_init_one()")
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Reported-by: YunQiang Su <wzssyqa@gmail.com>
Tested-by: YunQiang Su <wzssyqa@gmail.com>
Cc: stable@vger.kernel.org
Acked-by: Shai Malin <smalin@marvell.com>
Link: https://lore.kernel.org/r/20210912190523.27991-1-bunk@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Adrian Bunk authored and Jakub Kicinski committed Sep 15, 2021
1 parent d198b27 commit 52ce14c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 52ce14c

Please sign in to comment.