@@ -240,7 +240,7 @@ static void pcibios_allocate_dev_resources(struct pci_dev *dev, int pass)
struct resource *r;
pci_read_config_word(dev, PCI_COMMAND, &command);
- for_each_pci_resource(dev, r, idx, PCI_STD_IOV_RES) {
+ for_each_pci_resource(dev, r, idx, PCI_STD_IOV_ADDON_RES) {
if (r->parent) /* Already allocated */
continue;
if (!r->start) /* Address not assigned at all */
@@ -1088,7 +1088,7 @@ static void acpiphp_sanitize_bus(struct pci_bus *bus)
struct resource *res;
list_for_each_entry(dev, &bus->devices, bus_list) {
- for_each_pci_resource(dev, res, i, PCI_STD_ROM_IOV_RES) {
+ for_each_pci_resource(dev, res, i, PCI_STD_ROM_IOV_ADDON_RES) {
if ((res->flags & type_mask) && !res->start &&
res->end) {
/* Could not assign a required resources
@@ -1173,7 +1173,8 @@ pci_dev_driver(const struct pci_dev *dev)
struct resource *res;
int i;
- for_each_pci_resource((struct pci_dev *)dev, res, i, PCI_STD_ROM_RES)
+ for_each_pci_resource((struct pci_dev *)dev, res, i,
+ PCI_STD_ROM_ADDON_RES)
if (res->flags & IORESOURCE_BUSY)
return &pci_compat_driver;
}
@@ -442,7 +442,7 @@ pci_restore_bars(struct pci_dev *dev)
int i;
struct resource *res;
- for_each_pci_resource(dev, res, i, PCI_STD_ROM_IOV_RES)
+ for_each_pci_resource(dev, res, i, PCI_STD_ROM_IOV_ADDON_RES)
pci_update_resource(dev, i);
}
@@ -1172,7 +1172,7 @@ static int pci_enable_device_flags(struct pci_dev *dev, unsigned long flags)
return 0; /* already enabled */
/* only skip sriov related */
- for_each_pci_resource(dev, res, i, PCI_STD_ROM_BRIDGE_RES) {
+ for_each_pci_resource(dev, res, i, PCI_STD_ROM_BRIDGE_ADDON_RES) {
/* TODO: check i with bits of bars */
if (res->flags & flags)
bars |= (1 << i);
@@ -3782,7 +3782,7 @@ void pci_reassigndev_resource_alignment(struct pci_dev *dev)
command &= ~PCI_COMMAND_MEMORY;
pci_write_config_word(dev, PCI_COMMAND, command);
- for_each_pci_resource(dev, r, i, PCI_STD_ROM_IOV_RES) {
+ for_each_pci_resource(dev, r, i, PCI_STD_ROM_IOV_ADDON_RES) {
r = &dev->resource[i];
if (!(r->flags & IORESOURCE_MEM))
continue;
Replace PCI_STD_... with PCI_STD..._ADDON_... in the loop of for_each_pci_resource. Signed-off-by: Yinghai Lu <yinghai@kernel.org> --- arch/x86/pci/i386.c | 2 +- drivers/pci/hotplug/acpiphp_glue.c | 2 +- drivers/pci/pci-driver.c | 3 ++- drivers/pci/pci.c | 6 +++--- 4 files changed, 7 insertions(+), 6 deletions(-)