[PATCH v2 2/2] powerpc/PCI: Disable MSI/MSI-X interrupts at PCI probe time in OF case
Michael Ellerman
mpe at ellerman.id.au
Mon Sep 7 13:10:03 AEST 2015
On Thu, 2015-09-03 at 12:56 -0500, Bjorn Helgaas wrote:
> [+cc Fam, Yinghai, Yijing, Eric (reviewers of MST's original series), Dave]
>
> Hi Guilherme,
>
> On Wed, Aug 19, 2015 at 03:54:10PM -0300, Guilherme G. Piccoli wrote:
> > diff --git a/arch/powerpc/kernel/pci_of_scan.c b/arch/powerpc/kernel/pci_of_scan.c
> > index 42e02a2..0e920f3 100644
> > --- a/arch/powerpc/kernel/pci_of_scan.c
> > +++ b/arch/powerpc/kernel/pci_of_scan.c
> > @@ -191,6 +191,9 @@ struct pci_dev *of_create_pci_dev(struct device_node *node,
> >
> > pci_device_add(dev, bus);
> >
> > + /* Disable MSI/MSI-X here to avoid bogus interrupts */
> > + pci_msi_setup_pci_dev(dev);
>
> of_create_pci_dev() already has a lot of code that duplicates
> pci_setup_device(), and it's a shame to add more. There's also a sparc
> version of of_create_pci_dev() that presumably has the same problem you're
> fixing for powerpc.
>
> Michael originally called pci_msi_setup_pci_dev() from
> pci_init_capabilities() [1]. A subsequent patch moved the call
> to pci_setup_device() [2] because an early quirk (called from
> pci_setup_device()) used pci_msi_off(), which depended on
> pci_msi_setup_pci_dev().
>
> But we later removed pci_msi_off() completely, so I think we probably
> *could* call pci_msi_setup_pci_dev() from pci_init_capabilities().
>
> That would be much nicer because it makes more sense there, and it
> would do the right thing for powerpc and sparc because they both
> already use that path.
Sounds reasonable to me.
Guilherme can you please try this and let us know.
cheers
More information about the Linuxppc-dev
mailing list