path: root/arch/powerpc/platforms/powernv/pci.c
diff options
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-05-21 22:58:21 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-05-24 18:13:45 +1000
commitb72c1f651491e4cd33ddec79c504a49071a512f0 (patch)
treebd17bad6c182c986bbadd5a30d1afe98804f07ea /arch/powerpc/platforms/powernv/pci.c
parent59affcd3e460b97492bc1aa2b843bafe7c54f596 (diff)
powerpc: Make radeon 32-bit MSI quirk work on powernv
This moves the quirk itself to pci_64.c as to get built on all ppc64 platforms (the only ones with a pci_dn), factors the two implementations of get_pdn() into a single pci_get_dn() and use the quirk to do 32-bit MSIs on IODA based powernv platforms. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/powernv/pci.c')
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/powernv/pci.c b/arch/powerpc/platforms/powernv/pci.c
index 098d3573315..277343cc6a3 100644
--- a/arch/powerpc/platforms/powernv/pci.c
+++ b/arch/powerpc/platforms/powernv/pci.c
@@ -47,6 +47,10 @@ static int pnv_msi_check_device(struct pci_dev* pdev, int nvec, int type)
struct pci_controller *hose = pci_bus_to_host(pdev->bus);
struct pnv_phb *phb = hose->private_data;
+ struct pci_dn *pdn = pci_get_pdn(pdev);
+ if (pdn && pdn->force_32bit_msi && !phb->msi32_support)
+ return -ENODEV;
return (phb && phb->msi_bmp.bitmap) ? 0 : -ENODEV;