aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-04-21 18:58:35 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-21 18:58:35 -0400
commitbda0c0afa7a694bb1459fd023515aca681e4d79a (patch)
treecd8b9d9811463de2065cbe79d59689082d6c53cf /arch/parisc
parent904e0ab54b7591b9cb01cfc0dbbedcc8bc0d949b (diff)
parentaf40b485ea2d957ae2f237ab0e33539ae8f29562 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6: (42 commits) PCI: Change PCI subsystem MAINTAINER PCI: pci-iommu-iotlb-flushing-speedup PCI: pci_setup_bridge() mustn't be __devinit PCI: pci_bus_size_cardbus() mustn't be __devinit PCI: pci_scan_device() mustn't be __devinit PCI: pci_alloc_child_bus() mustn't be __devinit PCI: replace remaining __FUNCTION__ occurrences PCI: Hotplug: fakephp: Return success, not ENODEV, when bus rescan is triggered PCI: Hotplug: Fix leaks in IBM Hot Plug Controller Driver - ibmphp_init_devno() PCI: clean up resource alignment management PCI: aerdrv_acpi.c: remove unneeded NULL check PCI: Update VIA CX700 quirk PCI: Expose PCI VPD through sysfs PCI: iommu: iotlb flushing PCI: simplify quirk debug output PCI: iova RB tree setup tweak PCI: parisc: use generic pci_enable_resources() PCI: ppc: use generic pci_enable_resources() PCI: powerpc: use generic pci_enable_resources() PCI: ia64: use generic pci_enable_resources() ...
Diffstat (limited to 'arch/parisc')
-rw-r--r--arch/parisc/kernel/pci.c30
1 files changed, 13 insertions, 17 deletions
diff --git a/arch/parisc/kernel/pci.c b/arch/parisc/kernel/pci.c
index 507d0ac99f66..6936386c9861 100644
--- a/arch/parisc/kernel/pci.c
+++ b/arch/parisc/kernel/pci.c
@@ -287,23 +287,15 @@ void pcibios_align_resource(void *data, struct resource *res,
287 */ 287 */
288int pcibios_enable_device(struct pci_dev *dev, int mask) 288int pcibios_enable_device(struct pci_dev *dev, int mask)
289{ 289{
290 u16 cmd; 290 int err;
291 int idx; 291 u16 cmd, old_cmd;
292 292
293 pci_read_config_word(dev, PCI_COMMAND, &cmd); 293 err = pci_enable_resources(dev, mask);
294 294 if (err < 0)
295 for (idx = 0; idx < DEVICE_COUNT_RESOURCE; idx++) { 295 return err;
296 struct resource *r = &dev->resource[idx];
297 296
298 /* only setup requested resources */ 297 pci_read_config_word(dev, PCI_COMMAND, &cmd);
299 if (!(mask & (1<<idx))) 298 old_cmd = cmd;
300 continue;
301
302 if (r->flags & IORESOURCE_IO)
303 cmd |= PCI_COMMAND_IO;
304 if (r->flags & IORESOURCE_MEM)
305 cmd |= PCI_COMMAND_MEMORY;
306 }
307 299
308 cmd |= (PCI_COMMAND_SERR | PCI_COMMAND_PARITY); 300 cmd |= (PCI_COMMAND_SERR | PCI_COMMAND_PARITY);
309 301
@@ -312,8 +304,12 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
312 if (dev->bus->bridge_ctl & PCI_BRIDGE_CTL_FAST_BACK) 304 if (dev->bus->bridge_ctl & PCI_BRIDGE_CTL_FAST_BACK)
313 cmd |= PCI_COMMAND_FAST_BACK; 305 cmd |= PCI_COMMAND_FAST_BACK;
314#endif 306#endif
315 DBGC("PCIBIOS: Enabling device %s cmd 0x%04x\n", pci_name(dev), cmd); 307
316 pci_write_config_word(dev, PCI_COMMAND, cmd); 308 if (cmd != old_cmd) {
309 dev_info(&dev->dev, "enabling SERR and PARITY (%04x -> %04x)\n",
310 old_cmd, cmd);
311 pci_write_config_word(dev, PCI_COMMAND, cmd);
312 }
317 return 0; 313 return 0;
318} 314}
319 315