mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-28 16:52:18 +00:00
Merge branch into tip/master: 'irq/urgent'
# New commits in irq/urgent:
a60b990798
("PCI/MSI: Handle lack of irqdomain gracefully")
Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
commit
8516ed93ca
@ -350,8 +350,11 @@ bool pci_msi_domain_supports(struct pci_dev *pdev, unsigned int feature_mask,
|
||||
|
||||
domain = dev_get_msi_domain(&pdev->dev);
|
||||
|
||||
if (!domain || !irq_domain_is_hierarchy(domain))
|
||||
return mode == ALLOW_LEGACY;
|
||||
if (!domain || !irq_domain_is_hierarchy(domain)) {
|
||||
if (IS_ENABLED(CONFIG_PCI_MSI_ARCH_FALLBACKS))
|
||||
return mode == ALLOW_LEGACY;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!irq_domain_is_msi_parent(domain)) {
|
||||
/*
|
||||
|
@ -433,6 +433,10 @@ int __pci_enable_msi_range(struct pci_dev *dev, int minvec, int maxvec,
|
||||
if (WARN_ON_ONCE(dev->msi_enabled))
|
||||
return -EINVAL;
|
||||
|
||||
/* Test for the availability of MSI support */
|
||||
if (!pci_msi_domain_supports(dev, 0, ALLOW_LEGACY))
|
||||
return -ENOTSUPP;
|
||||
|
||||
nvec = pci_msi_vec_count(dev);
|
||||
if (nvec < 0)
|
||||
return nvec;
|
||||
|
Loading…
Reference in New Issue
Block a user