mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 14:52:34 +00:00
PCI/MSI: Ignore affinity if pre/post vector count is more than min_vecs
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: dfef358bd1
("PCI/MSI: Don't apply affinity if there aren't enough vectors left")
Signed-off-by: Michael Hernandez <michael.hernandez@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: stable@vger.kernel.org # v4.10+
This commit is contained in:
parent
2ea659a9ef
commit
6f9a22bc57
3 changed files with 16 additions and 15 deletions
|
@ -291,7 +291,7 @@ extern int
|
|||
irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify);
|
||||
|
||||
struct cpumask *irq_create_affinity_masks(int nvec, const struct irq_affinity *affd);
|
||||
int irq_calc_affinity_vectors(int maxvec, const struct irq_affinity *affd);
|
||||
int irq_calc_affinity_vectors(int minvec, int maxvec, const struct irq_affinity *affd);
|
||||
|
||||
#else /* CONFIG_SMP */
|
||||
|
||||
|
@ -331,7 +331,7 @@ irq_create_affinity_masks(int nvec, const struct irq_affinity *affd)
|
|||
}
|
||||
|
||||
static inline int
|
||||
irq_calc_affinity_vectors(int maxvec, const struct irq_affinity *affd)
|
||||
irq_calc_affinity_vectors(int minvec, int maxvec, const struct irq_affinity *affd)
|
||||
{
|
||||
return maxvec;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue