[SRU Bionic/Focal/Hirsute/Impish/hwe-5.8/oem-5.10] bnx2x: Fix enabling network interfaces without VFs
Thadeu Lima de Souza Cascardo
cascardo at canonical.com
Fri Oct 1 02:26:01 UTC 2021
On Thu, Sep 30, 2021 at 11:20:06PM -0300, Thadeu Lima de Souza Cascardo wrote:
> From: Adrian Bunk <bunk at kernel.org>
>
> BugLink: https://bugs.launchpad.net/bugs/1945707
For some reason, I can't add the SRU template to the bug description, so I
added it as a comment.
And here it is as well:
[Impact]
bnx2x driver won't add all devices ports/interfaces.
[Test case]
Boot system with bnx2x device and verify all ports/interfaces have been added.
[Potential regression]
bnx2x devices won't be properly probed. Devices won't be added or SR-IOV won't be correctly supported.
Cascardo.
>
> 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 <bunk at kernel.org>
> Reported-by: YunQiang Su <wzssyqa at gmail.com>
> Tested-by: YunQiang Su <wzssyqa at gmail.com>
> Cc: stable at vger.kernel.org
> Acked-by: Shai Malin <smalin at marvell.com>
> Link: https://lore.kernel.org/r/20210912190523.27991-1-bunk@kernel.org
> Signed-off-by: Jakub Kicinski <kuba at kernel.org>
> (cherry picked from commit 52ce14c134a003fee03d8fc57442c05a55b53715)
> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo at canonical.com>
> ---
> 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 9108b497b3c9..03eb0179ec00 100644
> --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
> +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
> @@ -1225,7 +1225,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.30.2
>
>
> --
> kernel-team mailing list
> kernel-team at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
More information about the kernel-team
mailing list