[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [linux-2.6.18-xen] IA64: Bug fix for kexec to work on an HP rx2620 ia64 machine.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1207300862 -3600
# Node ID 3cd6b2bef0cec5997951d2667e7c96f7dcb1fd9d
# Parent  2cc4d7bf6b61649e97d2d26d9105e66aa53c546b
IA64: Bug fix for kexec to work on an HP rx2620 ia64 machine.

 PCI: fix for quirk_e100_interrupt()

 Check that the e100 is in the D0 power state. If it's not, it won't
 respond to MMIO accesses and we end up with master-abort machine
 checks on some platforms.

 Signed-off-by: Ivan Kokshaysky <ink@xxxxxxxxxxxxxxxxxxxx>
 Cc: Auke Kok <auke-jan.h.kok@xxxxxxxxx>
 Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

Signed-off-by: Simon Horman <horms@xxxxxxxxxxxx>
---
 drivers/pci/quirks.c |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletion(-)

diff -r 2cc4d7bf6b61 -r 3cd6b2bef0ce drivers/pci/quirks.c
--- a/drivers/pci/quirks.c      Thu Apr 03 11:36:05 2008 +0100
+++ b/drivers/pci/quirks.c      Fri Apr 04 10:21:02 2008 +0100
@@ -1528,10 +1528,11 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_N
 
 static void __devinit quirk_e100_interrupt(struct pci_dev *dev)
 {
-       u16 command;
+       u16 command, pmcsr;
        u32 bar;
        u8 __iomem *csr;
        u8 cmd_hi;
+       int pm;
 
        switch (dev->device) {
        /* PCI IDs taken from drivers/net/e100.c */
@@ -1566,6 +1567,17 @@ static void __devinit quirk_e100_interru
        if (!(command & PCI_COMMAND_MEMORY) || !bar)
                return;
 
+        /*
+         * Check that the device is in the D0 power state. If it's not,
+         * there is no point to look any further.
+         */
+        pm = pci_find_capability(dev, PCI_CAP_ID_PM);
+        if (pm) {
+                pci_read_config_word(dev, pm + PCI_PM_CTRL, &pmcsr);
+                if ((pmcsr & PCI_PM_CTRL_STATE_MASK) != PCI_D0)
+                        return;
+        }
+
        csr = ioremap(bar, 8);
        if (!csr) {
                printk(KERN_WARNING "PCI: Can't map %s e100 registers\n",

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.