* [PATCH] x86/mrst/pci: avoid enabling intx for msi capable devices
@ 2010-06-21 18:30 Jacob Pan
2010-06-21 19:01 ` H. Peter Anvin
0 siblings, 1 reply; 3+ messages in thread
From: Jacob Pan @ 2010-06-21 18:30 UTC (permalink / raw)
To: Jesse Barnes, H. Peter Anvin, Alan Cox, Thomas Gleixner,
Ingo Molnar, LKML, Moblin Kernel, Arjan van de Ven
Cc: Jacob Pan
On Moorestown platform, true PCI devices with MSI capabilities do not support
INTx mode. IRQ line# for those devices are zeros in the PCI shim, an attempt
to enable INTx on these MSI capable devices will cause conflict in the system
such as IRQ0 for the system timers.
If the device driver probes/enables MSI before pci_enable_device(), the conflict
is not shown since INTx will be disabled. But if the driver tries to enable INTx
before MSI, the conflict will cause system timer IRQ0 to break.
This patch will ensure the ordering of INTx and MSI setup by the driver is
not relavent to INTx conflict. We will always skip INTx setup for MSI capable
devices on Moorestown.
Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
---
arch/x86/pci/mrst.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/arch/x86/pci/mrst.c b/arch/x86/pci/mrst.c
index d5c7aef..ba3f08b 100644
--- a/arch/x86/pci/mrst.c
+++ b/arch/x86/pci/mrst.c
@@ -203,6 +203,9 @@ static int mrst_pci_irq_enable(struct pci_dev *dev)
u8 pin;
struct io_apic_irq_attr irq_attr;
+ if (pci_find_capability(dev, PCI_CAP_ID_MSI))
+ return 0;
+
pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
/* MRST only have IOAPIC, the PCI irq lines are 1:1 mapped to
--
1.6.3.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] x86/mrst/pci: avoid enabling intx for msi capable devices
2010-06-21 18:30 [PATCH] x86/mrst/pci: avoid enabling intx for msi capable devices Jacob Pan
@ 2010-06-21 19:01 ` H. Peter Anvin
2010-06-21 19:12 ` Jesse Barnes
0 siblings, 1 reply; 3+ messages in thread
From: H. Peter Anvin @ 2010-06-21 19:01 UTC (permalink / raw)
To: Jacob Pan
Cc: Jesse Barnes, Alan Cox, Thomas Gleixner, Ingo Molnar, LKML,
Moblin Kernel, Arjan van de Ven
Jesse: are you taking this or should I?
-hpa
On 06/21/2010 11:30 AM, Jacob Pan wrote:
> On Moorestown platform, true PCI devices with MSI capabilities do not support
> INTx mode. IRQ line# for those devices are zeros in the PCI shim, an attempt
> to enable INTx on these MSI capable devices will cause conflict in the system
> such as IRQ0 for the system timers.
> If the device driver probes/enables MSI before pci_enable_device(), the conflict
> is not shown since INTx will be disabled. But if the driver tries to enable INTx
> before MSI, the conflict will cause system timer IRQ0 to break.
>
> This patch will ensure the ordering of INTx and MSI setup by the driver is
> not relavent to INTx conflict. We will always skip INTx setup for MSI capable
> devices on Moorestown.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] x86/mrst/pci: avoid enabling intx for msi capable devices
2010-06-21 19:01 ` H. Peter Anvin
@ 2010-06-21 19:12 ` Jesse Barnes
0 siblings, 0 replies; 3+ messages in thread
From: Jesse Barnes @ 2010-06-21 19:12 UTC (permalink / raw)
To: H. Peter Anvin
Cc: Jacob Pan, Alan Cox, Thomas Gleixner, Ingo Molnar, LKML,
Moblin Kernel, Arjan van de Ven
On Mon, 21 Jun 2010 12:01:30 -0700
"H. Peter Anvin" <hpa@zytor.com> wrote:
> Jesse: are you taking this or should I?
>
> -hpa
>
> On 06/21/2010 11:30 AM, Jacob Pan wrote:
> > On Moorestown platform, true PCI devices with MSI capabilities do not support
> > INTx mode. IRQ line# for those devices are zeros in the PCI shim, an attempt
> > to enable INTx on these MSI capable devices will cause conflict in the system
> > such as IRQ0 for the system timers.
> > If the device driver probes/enables MSI before pci_enable_device(), the conflict
> > is not shown since INTx will be disabled. But if the driver tries to enable INTx
> > before MSI, the conflict will cause system timer IRQ0 to break.
> >
> > This patch will ensure the ordering of INTx and MSI setup by the driver is
> > not relavent to INTx conflict. We will always skip INTx setup for MSI capable
> > devices on Moorestown.
You go ahead. You can add my:
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Thanks,
--
Jesse Barnes, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-06-21 19:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-21 18:30 [PATCH] x86/mrst/pci: avoid enabling intx for msi capable devices Jacob Pan
2010-06-21 19:01 ` H. Peter Anvin
2010-06-21 19:12 ` Jesse Barnes
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.