qed: Fix the VF msix vectors flow
Subsystems (3)
PATCH 1/1 qed: Fix the VF msix vectors flow
For VFs we should return with an error in case we didn't get the exact number of msix vectors as we requested.
Not doing that will lead to a crash when starting queues for this VF.
Signed-off-by Prabhakar Kushwaha <[email protected]>
Signed-off-by Ariel Elior <[email protected]>
Signed-off-by Shai Malin <[email protected]>
--- drivers/net/ethernet/qlogic/qed/qed_main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/net/ethernet/qlogic/qed/qed_main.c +6 -1
@@ -615,7 +615,12 @@ static int qed_enable_msix(struct qed_dev *cdev, rc = cnt; } -if (rc >0 ) { +/* For VFs, we should return with an error in case we didn't get the +* exact number of msix vectors as we requested. +* Not doing that will lead to a crash when starting queues for +* this VF. +*/ +if ((IS_PF (cdev) && rc >0 ) || (IS_VF (cdev) && rc == cnt)) {/* MSI-x configuration was achieved */ int_params->out.int_mode =QED_INT_MODE_MSIX ; int_params->out.num_vectors = rc;
Signature · 1 line
2.22.0
This patch was applied to netdev/net.git (refs/heads/master):
Hello:
This patch was applied to netdev/net.git (refs/heads/master):
Quoted 9 lines · On Sun, 22 Aug 2021 22:21:14 +0300 you wrote:
For VFs we should return with an error in case we didn't get the exact number of msix vectors as we requested.
Not doing that will lead to a crash when starting queues for this VF.Signed-off-by Prabhakar Kushwaha <[email protected]>Signed-off-by Ariel Elior <[email protected]>Signed-off-by Shai Malin <[email protected]>[...]
Here is the summary with links:
- qed: Fix the VF msix vectors flow
https://git.kernel.org/netdev/net/c/b0cd08537db8
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html