ia64/linux-2.6.18-xen.hg

changeset 511:3cd6b2bef0ce

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@jurassic.park.msu.ru>
Cc: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Signed-off-by: Simon Horman <horms@verge.net.au>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Apr 04 10:21:02 2008 +0100 (2008-04-04)
parents 2cc4d7bf6b61
children 70acfc9814c9
files drivers/pci/quirks.c
line diff
     1.1 --- a/drivers/pci/quirks.c	Thu Apr 03 11:36:05 2008 +0100
     1.2 +++ b/drivers/pci/quirks.c	Fri Apr 04 10:21:02 2008 +0100
     1.3 @@ -1528,10 +1528,11 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_N
     1.4  
     1.5  static void __devinit quirk_e100_interrupt(struct pci_dev *dev)
     1.6  {
     1.7 -	u16 command;
     1.8 +	u16 command, pmcsr;
     1.9  	u32 bar;
    1.10  	u8 __iomem *csr;
    1.11  	u8 cmd_hi;
    1.12 +	int pm;
    1.13  
    1.14  	switch (dev->device) {
    1.15  	/* PCI IDs taken from drivers/net/e100.c */
    1.16 @@ -1566,6 +1567,17 @@ static void __devinit quirk_e100_interru
    1.17  	if (!(command & PCI_COMMAND_MEMORY) || !bar)
    1.18  		return;
    1.19  
    1.20 +        /*
    1.21 +         * Check that the device is in the D0 power state. If it's not,
    1.22 +         * there is no point to look any further.
    1.23 +         */
    1.24 +        pm = pci_find_capability(dev, PCI_CAP_ID_PM);
    1.25 +        if (pm) {
    1.26 +                pci_read_config_word(dev, pm + PCI_PM_CTRL, &pmcsr);
    1.27 +                if ((pmcsr & PCI_PM_CTRL_STATE_MASK) != PCI_D0)
    1.28 +                        return;
    1.29 +        }
    1.30 +
    1.31  	csr = ioremap(bar, 8);
    1.32  	if (!csr) {
    1.33  		printk(KERN_WARNING "PCI: Can't map %s e100 registers\n",