From: Michael Hernandez <[email protected]>
min_vecs is the minimum amount of vectors needed to operate in MSI-X mode
which may just include the vectors that don't need affinity.
Disabling affinity settings causes the qla2xxx driver scsi_add_host
to fail when blk_mq is enabled as the blk_mq_pci_map_queues expects
affinity masks on each vector.
Fixes: dfef358 ("PCI/MSI: Don't apply affinity if there aren't enough vectors
left")
Signed-off-by: Michael Hernandez <[email protected]>
Signed-off-by: Himanshu Madhani <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: [email protected]
---
drivers/pci/msi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index 7f73bac..5823348 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -1214,7 +1214,7 @@ int pci_alloc_irq_vectors_affinity(struct pci_dev *dev,
unsigned int min_vecs,
* If there aren't any vectors left after applying the pre/post
* vectors don't bother with assigning affinity.
*/
- if (affd->pre_vectors + affd->post_vectors == min_vecs)
+ if (affd->pre_vectors + affd->post_vectors == max_vecs)
affd = NULL;
} else {
if (WARN_ON(affd))
--
1.8.3.1