]> xenbits.xensource.com Git - legacy/linux-2.6.18-xen.git/commitdiff
Dom0 PCI: fix a regression introduced by the SR-IOV change
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 3 Jun 2009 10:21:52 +0000 (11:21 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 3 Jun 2009 10:21:52 +0000 (11:21 +0100)
The device class may be changed during the early fixup. So need to
re-read the device class from pci_dev after the fixup.

The patch "PCI: centralize device setup code" (c/s 825) wrongly
cleaned up the device class re-read. This patch reverts that change.

Signed-off-by: Yu Zhao <yu.zhao@intel.com>
drivers/pci/probe.c

index 4cb5c5ac4e4fa61bdd7c88f5d82edc323b9d71b5..141093870a6c52b5f35e4ceaeaffd94b0de7e8e6 100644 (file)
@@ -721,6 +721,7 @@ int pci_setup_device(struct pci_dev *dev)
 
        /* Early fixups, before probing the BARs */
        pci_fixup_device(pci_fixup_early, dev);
+       class = dev->class >> 8;
 
        switch (dev->hdr_type) {                    /* header type */
        case PCI_HEADER_TYPE_NORMAL:                /* standard header */