mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 22:26:55 +00:00
qed: Fix the VF msix vectors flow
[ Upstream commit b0cd08537d
]
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 <pkushwaha@marvell.com>
Signed-off-by: Ariel Elior <aelior@marvell.com>
Signed-off-by: Shai Malin <smalin@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
f5f68d775a
commit
959f994607
1 changed files with 6 additions and 1 deletions
|
@ -437,7 +437,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;
|
||||
|
|
Loading…
Reference in a new issue