diff options
Diffstat (limited to 'arch/mips/pci/pci.c')
| -rw-r--r-- | arch/mips/pci/pci.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c index 6e6981fd7934..f9471d77c096 100644 --- a/arch/mips/pci/pci.c +++ b/arch/mips/pci/pci.c | |||
| @@ -177,8 +177,15 @@ static int pcibios_enable_resources(struct pci_dev *dev, int mask) | |||
| 177 | continue; | 177 | continue; |
| 178 | 178 | ||
| 179 | r = &dev->resource[idx]; | 179 | r = &dev->resource[idx]; |
| 180 | if (!(r->flags & (IORESOURCE_IO | IORESOURCE_MEM))) | ||
| 181 | continue; | ||
| 182 | if ((idx == PCI_ROM_RESOURCE) && | ||
| 183 | (!(r->flags & IORESOURCE_ROM_ENABLE))) | ||
| 184 | continue; | ||
| 180 | if (!r->start && r->end) { | 185 | if (!r->start && r->end) { |
| 181 | printk(KERN_ERR "PCI: Device %s not available because of resource collisions\n", pci_name(dev)); | 186 | printk(KERN_ERR "PCI: Device %s not available " |
| 187 | "because of resource collisions\n", | ||
| 188 | pci_name(dev)); | ||
| 182 | return -EINVAL; | 189 | return -EINVAL; |
| 183 | } | 190 | } |
| 184 | if (r->flags & IORESOURCE_IO) | 191 | if (r->flags & IORESOURCE_IO) |
| @@ -186,10 +193,9 @@ static int pcibios_enable_resources(struct pci_dev *dev, int mask) | |||
| 186 | if (r->flags & IORESOURCE_MEM) | 193 | if (r->flags & IORESOURCE_MEM) |
| 187 | cmd |= PCI_COMMAND_MEMORY; | 194 | cmd |= PCI_COMMAND_MEMORY; |
| 188 | } | 195 | } |
| 189 | if (dev->resource[PCI_ROM_RESOURCE].start) | ||
| 190 | cmd |= PCI_COMMAND_MEMORY; | ||
| 191 | if (cmd != old_cmd) { | 196 | if (cmd != old_cmd) { |
| 192 | printk("PCI: Enabling device %s (%04x -> %04x)\n", pci_name(dev), old_cmd, cmd); | 197 | printk("PCI: Enabling device %s (%04x -> %04x)\n", |
| 198 | pci_name(dev), old_cmd, cmd); | ||
| 193 | pci_write_config_word(dev, PCI_COMMAND, cmd); | 199 | pci_write_config_word(dev, PCI_COMMAND, cmd); |
| 194 | } | 200 | } |
| 195 | return 0; | 201 | return 0; |
