]> git.baikalelectronics.ru Git - kernel.git/commitdiff
powerpc/pseries/msi: Use PCI device properties
authorThomas Gleixner <tglx@linutronix.de>
Fri, 10 Dec 2021 22:18:52 +0000 (23:18 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 16 Dec 2021 21:16:38 +0000 (22:16 +0100)
instead of fiddling with MSI descriptors.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20211210221813.556202506@linutronix.de
arch/powerpc/platforms/pseries/msi.c

index 8e287204eeae9ecd5fcb7685cc6bdacbb497550e..dc8cf3603f9af1309d39c006b5537195e743b782 100644 (file)
@@ -448,8 +448,7 @@ static int pseries_msi_ops_prepare(struct irq_domain *domain, struct device *dev
                                   int nvec, msi_alloc_info_t *arg)
 {
        struct pci_dev *pdev = to_pci_dev(dev);
-       struct msi_desc *desc = first_pci_msi_entry(pdev);
-       int type = desc->pci.msi_attrib.is_msix ? PCI_CAP_ID_MSIX : PCI_CAP_ID_MSI;
+       int type = pdev->msix_enabled ? PCI_CAP_ID_MSIX : PCI_CAP_ID_MSI;
 
        return rtas_prepare_msi_irqs(pdev, nvec, type, arg);
 }