Commit 553da2b2 authored by Anton Blanchard's avatar Anton Blanchard

ppc64: Fix a bad shift against PCI_BASE_CLASS_BRIDGE from Will Schmidt

parent f572f5e3
...@@ -124,7 +124,7 @@ struct pci_dev *pci_find_dev_by_addr(unsigned long addr) ...@@ -124,7 +124,7 @@ struct pci_dev *pci_find_dev_by_addr(unsigned long addr)
ioaddr = (addr > isa_io_base) ? addr - isa_io_base : 0; ioaddr = (addr > isa_io_base) ? addr - isa_io_base : 0;
pci_for_each_dev(dev) { pci_for_each_dev(dev) {
if ((dev->class >> 8) == PCI_BASE_CLASS_BRIDGE) if ((dev->class >> 16) == PCI_BASE_CLASS_BRIDGE)
continue; continue;
for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
unsigned long start = pci_resource_start(dev,i); unsigned long start = pci_resource_start(dev,i);
......
...@@ -77,7 +77,7 @@ struct device_node *fetch_dev_dn(struct pci_dev *dev); ...@@ -77,7 +77,7 @@ struct device_node *fetch_dev_dn(struct pci_dev *dev);
static inline struct device_node *pci_device_to_OF_node(struct pci_dev *dev) static inline struct device_node *pci_device_to_OF_node(struct pci_dev *dev)
{ {
struct device_node *dn = (struct device_node *)(dev->sysdata); struct device_node *dn = (struct device_node *)(dev->sysdata);
if (dn->devfn == dev->devfn && dn->busno == dev->bus->number) if (dn->devfn == dev->devfn && dn->busno == (dev->bus->number&0xff))
return dn; /* fast path. sysdata is good */ return dn; /* fast path. sysdata is good */
else else
return fetch_dev_dn(dev); return fetch_dev_dn(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment