mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Allow MSI to work on kexec kernel
@ 2006-05-23 17:14 Rajesh Shah
  0 siblings, 0 replies; only message in thread
From: Rajesh Shah @ 2006-05-23 17:14 UTC (permalink / raw)
  To: gregkh, ak, linux-pci; +Cc: linux-kernel

We recently ran into a problem where the e1000 device failed to
work properly on the kexec kernel. MSI was enabled for the
device in the main kernel when it crashed. The e1000 driver
tried to enable MSI on the kexec kernel, but the code bailed
early when it found that MSI was already enabled in the hardware,
even though the software state was not properly set up in the
kexec'd kernel. This patch fixes the problem by moving the
early return to after making sure that the software state
is properly initialized.

Signed-off-by: Rajesh Shah <rajesh.shah@intel.com>

 drivers/pci/msi.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

Index: linux/drivers/pci/msi.c
===================================================================
--- linux.orig/drivers/pci/msi.c	2006-05-18 12:35:00.000000000 -0700
+++ linux/drivers/pci/msi.c	2006-05-19 23:07:11.000000000 -0700
@@ -879,14 +879,13 @@
    	if (!(pos = pci_find_capability(dev, PCI_CAP_ID_MSI)))
 		return -EINVAL;
 
-	pci_read_config_word(dev, msi_control_reg(pos), &control);
-	if (control & PCI_MSI_FLAGS_ENABLE)
-		return 0;			/* Already in MSI mode */
-
 	if (!msi_lookup_vector(dev, PCI_CAP_ID_MSI)) {
 		/* Lookup Sucess */
 		unsigned long flags;
 
+		pci_read_config_word(dev, msi_control_reg(pos), &control);
+		if (control & PCI_MSI_FLAGS_ENABLE)
+			return 0;	/* Already in MSI mode */
 		spin_lock_irqsave(&msi_lock, flags);
 		if (!vector_irq[dev->irq]) {
 			msi_desc[dev->irq]->msi_attrib.state = 0;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-05-23 17:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-23 17:14 Allow MSI to work on kexec kernel Rajesh Shah

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®