public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* PCI MSI: the new interrupt routing headache
@ 2005-11-17  5:44 Jeff Garzik
  2005-11-17 19:07 ` Max Krasnyansky
  2005-11-18 20:52 ` Roland Dreier
  0 siblings, 2 replies; 3+ messages in thread
From: Jeff Garzik @ 2005-11-17  5:44 UTC (permalink / raw)
  To: Linux Kernel; +Cc: tom.l.nguyen, Greg KH


I just got SATA working on Marvell.  After fixing a bunch of issues in 
the driver, the final issue was lack of interrupts.  Disabling 
CONFIG_PCI_MSI solved that, and suddenly the driver was working quite 
nicely.

The general problem is that pci_enable_msi() is not failing, on systems 
that do not support MSI.  This leads to Infiniband, tg3, and other 
drivers working around this problem by including an MSI-interrupts-work 
test during probe.

Perhaps its because I like leading edge stuff, and am playing with 
drivers for PCI MSI hardware, but it seems like I am running into this 
pci_enable_msi()-doesnt-fail problem more and more frequently.  First 
tg3, then AHCI, now sata_mv.

What needs to be done, to detect working PCI message signalled 
interrupts such that pci_enable_msi() fails properly?

Thanks,

	Jeff




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PCI MSI: the new interrupt routing headache
  2005-11-17  5:44 PCI MSI: the new interrupt routing headache Jeff Garzik
@ 2005-11-17 19:07 ` Max Krasnyansky
  2005-11-18 20:52 ` Roland Dreier
  1 sibling, 0 replies; 3+ messages in thread
From: Max Krasnyansky @ 2005-11-17 19:07 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Linux Kernel, tom.l.nguyen, Greg KH

Hi Jeff,
> 
> I just got SATA working on Marvell.  After fixing a bunch of issues in 
> the driver, the final issue was lack of interrupts.  Disabling 
> CONFIG_PCI_MSI solved that, and suddenly the driver was working quite 
> nicely.
> 
> The general problem is that pci_enable_msi() is not failing, on systems 
> that do not support MSI.  This leads to Infiniband, tg3, and other 
> drivers working around this problem by including an MSI-interrupts-work 
> test during probe.
> 
> Perhaps its because I like leading edge stuff, and am playing with 
> drivers for PCI MSI hardware, but it seems like I am running into this 
> pci_enable_msi()-doesnt-fail problem more and more frequently.  First 
> tg3, then AHCI, now sata_mv.
> 
> What needs to be done, to detect working PCI message signalled 
> interrupts such that pci_enable_msi() fails properly?
It fails correctly when MSI quirk is enabled. I had the same problems
on AMD 8131 based machine with 2.6.11 kernel. E1000 was enabling MSI and
not getting any interrupts. Later (.13 I think) MSI quirk was introduced for
8131 chipset and everything started working (without having to hack E1000
that is).
May be you should just add your platform to the PCI quirks list ?

Max

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PCI MSI: the new interrupt routing headache
  2005-11-17  5:44 PCI MSI: the new interrupt routing headache Jeff Garzik
  2005-11-17 19:07 ` Max Krasnyansky
@ 2005-11-18 20:52 ` Roland Dreier
  1 sibling, 0 replies; 3+ messages in thread
From: Roland Dreier @ 2005-11-18 20:52 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Linux Kernel, tom.l.nguyen, Greg KH

    Jeff> What needs to be done, to detect working PCI message
    Jeff> signalled interrupts such that pci_enable_msi() fails
    Jeff> properly?

There are two things that cause MSIs not to work.  First, the PCI host
bridge may not have working MSI support.  To handle this, we have the
"msi_quirk" which is set by the PCI quirk code.  For example, this is
used on systems with AMD-8131 PCI-X bridges.  (As I've noted
elsewhere, this is actually too crude a method -- actual systems exist
with e.g. both AMD-8131 and Nforce4 PCI bridges, so that MSI works for
PCIe devices but not devices below the AMD-8131)

Second, there are PCI devices that have an MSI capability but which
don't have working MSI support.  Most revisions of the e1000 fall into
this category.  In this case, it is up to the driver to know when it's
safe to try to enable MSI.

However, given that MSI/MSI-X is not in wide use, there is undoubtedly
much more broken hardware (both chipsets and devices) that we don't
know about and need to add quirks or driver workarounds for.

Hence, in the interest of discovering this hardware and also in
getting less cryptic bug reports, it's a good idea to add a test that
interrupts actually work in any driver that tries to enable MSI or
MSI-X.  Since it requires knowledge of a device to know how to get the
device to trigger an interrupt, this test has to be done in each
driver and can't be centralized.

 - R.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-11-18 20:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-17  5:44 PCI MSI: the new interrupt routing headache Jeff Garzik
2005-11-17 19:07 ` Max Krasnyansky
2005-11-18 20:52 ` Roland Dreier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox