pci.c (3b7a17fcdae532d29dffab9d564a28be08960988) | pci.c (89a74ecccd1f78e51faf6287e5c0e93a92ac096e) |
---|---|
1/* 2 * pci.c - Low-Level PCI Access in IA-64 3 * 4 * Derived from bios32.c of i386 tree. 5 * 6 * (c) Copyright 2002, 2005 Hewlett-Packard Development Company, L.P. 7 * David Mosberger-Tang <davidm@hpl.hp.com> 8 * Bjorn Helgaas <bjorn.helgaas@hp.com> --- 438 unchanged lines hidden (view full) --- 447 res->start = region->start + offset; 448 res->end = region->end + offset; 449} 450EXPORT_SYMBOL(pcibios_bus_to_resource); 451 452static int __devinit is_valid_resource(struct pci_dev *dev, int idx) 453{ 454 unsigned int i, type_mask = IORESOURCE_IO | IORESOURCE_MEM; | 1/* 2 * pci.c - Low-Level PCI Access in IA-64 3 * 4 * Derived from bios32.c of i386 tree. 5 * 6 * (c) Copyright 2002, 2005 Hewlett-Packard Development Company, L.P. 7 * David Mosberger-Tang <davidm@hpl.hp.com> 8 * Bjorn Helgaas <bjorn.helgaas@hp.com> --- 438 unchanged lines hidden (view full) --- 447 res->start = region->start + offset; 448 res->end = region->end + offset; 449} 450EXPORT_SYMBOL(pcibios_bus_to_resource); 451 452static int __devinit is_valid_resource(struct pci_dev *dev, int idx) 453{ 454 unsigned int i, type_mask = IORESOURCE_IO | IORESOURCE_MEM; |
455 struct resource *devr = &dev->resource[idx]; | 455 struct resource *devr = &dev->resource[idx], *busr; |
456 457 if (!dev->bus) 458 return 0; | 456 457 if (!dev->bus) 458 return 0; |
459 for (i=0; i<PCI_BUS_NUM_RESOURCES; i++) { 460 struct resource *busr = dev->bus->resource[i]; | |
461 | 459 |
460 pci_bus_for_each_resource(dev->bus, busr, i) { |
|
462 if (!busr || ((busr->flags ^ devr->flags) & type_mask)) 463 continue; 464 if ((devr->start) && (devr->start >= busr->start) && 465 (devr->end <= busr->end)) 466 return 1; 467 } 468 return 0; 469} --- 332 unchanged lines hidden --- | 461 if (!busr || ((busr->flags ^ devr->flags) & type_mask)) 462 continue; 463 if ((devr->start) && (devr->start >= busr->start) && 464 (devr->end <= busr->end)) 465 return 1; 466 } 467 return 0; 468} --- 332 unchanged lines hidden --- |