mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jacob Pan <jacob.jun.pan@linux.intel.com>
To: Jesse Barnes <jbarnes@virtuousgeek.org>,
	"H. Peter Anvin" <hpa@zytor.com>, Alan Cox <alan@linux.intel.com>,
	Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>,
	LKML <linux-kernel@vger.kernel.org>,
	Moblin Kernel <moblin-kernel@linux.intel.com>,
	Arjan van de Ven <arjan@linux.intel.com>
Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
Subject: [PATCH] x86/mrst/pci: avoid enabling intx for msi capable devices
Date: Mon, 21 Jun 2010 11:30:55 -0700	[thread overview]
Message-ID: <1277145055-20566-1-git-send-email-jacob.jun.pan@linux.intel.com> (raw)

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


             reply	other threads:[~2010-06-21 18:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-21 18:30 Jacob Pan [this message]
2010-06-21 19:01 ` H. Peter Anvin
2010-06-21 19:12   ` Jesse Barnes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1277145055-20566-1-git-send-email-jacob.jun.pan@linux.intel.com \
    --to=jacob.jun.pan@linux.intel.com \
    --cc=alan@linux.intel.com \
    --cc=arjan@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=moblin-kernel@linux.intel.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®