]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
sfc: error code if SRIOV cannot be disabled
authorÍñigo Huguet <ihuguet@redhat.com>
Mon, 21 Jun 2021 15:32:36 +0000 (17:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Jul 2021 08:01:06 +0000 (10:01 +0200)
commitea26006707f6c06f34d2fd2fd17e85483dcc4b9c
tree54505775f1bbba1ffaf062f17b49f4e0027f3215
parent639a87f4f46f31c7d1cc5bcd1367f755f68a2080
sfc: error code if SRIOV cannot be disabled

[ Upstream commit 1ebe4feb8b442884f5a28d2437040096723dd1ea ]

If SRIOV cannot be disabled during device removal or module unloading,
return error code so it can be logged properly in the calling function.

Note that this can only happen if any VF is currently attached to a
guest using Xen, but not with vfio/KVM. Despite that in that case the
VFs won't work properly with PF removed and/or the module unloaded, I
have let it as is because I don't know what side effects may have
changing it, and also it seems to be the same that other drivers are
doing in this situation.

In the case of being called during SRIOV reconfiguration, the behavior
hasn't changed because the function is called with force=false.

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/sfc/ef10_sriov.c