Commit ed1533b5 authored by Thomas Gleixner's avatar Thomas Gleixner

powerpc/pseries/msi: Use PCI device properties

instead of fiddling with MSI descriptors.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Reviewed-by: default avatarJason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20211210221813.556202506@linutronix.de
parent d8a53057
...@@ -448,8 +448,7 @@ static int pseries_msi_ops_prepare(struct irq_domain *domain, struct device *dev ...@@ -448,8 +448,7 @@ static int pseries_msi_ops_prepare(struct irq_domain *domain, struct device *dev
int nvec, msi_alloc_info_t *arg) int nvec, msi_alloc_info_t *arg)
{ {
struct pci_dev *pdev = to_pci_dev(dev); struct pci_dev *pdev = to_pci_dev(dev);
struct msi_desc *desc = first_pci_msi_entry(pdev); int type = pdev->msix_enabled ? PCI_CAP_ID_MSIX : PCI_CAP_ID_MSI;
int type = desc->pci.msi_attrib.is_msix ? PCI_CAP_ID_MSIX : PCI_CAP_ID_MSI;
return rtas_prepare_msi_irqs(pdev, nvec, type, arg); return rtas_prepare_msi_irqs(pdev, nvec, type, arg);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment