patch-2.4.22 linux-2.4.22/arch/ppc/kernel/indirect_pci.c
Next file: linux-2.4.22/arch/ppc/kernel/irq.c
Previous file: linux-2.4.22/arch/ppc/kernel/idle_gen.c
Back to the patch index
Back to the overall index
- Lines: 22
- Date:
2003-08-25 04:44:40.000000000 -0700
- Orig file:
linux-2.4.21/arch/ppc/kernel/indirect_pci.c
- Orig date:
2003-06-13 07:51:31.000000000 -0700
diff -urN linux-2.4.21/arch/ppc/kernel/indirect_pci.c linux-2.4.22/arch/ppc/kernel/indirect_pci.c
@@ -29,10 +29,19 @@
indirect_##rw##_config_##size(struct pci_dev *dev, int offset, type val) \
{ \
struct pci_controller *hose = dev->sysdata; \
+ u8 cfg_type = 0; \
+ \
+ if (ppc_md.pci_exclude_device) \
+ if (ppc_md.pci_exclude_device(dev->bus->number, dev->devfn)) \
+ return PCIBIOS_DEVICE_NOT_FOUND; \
+ \
+ if (hose->set_cfg_type) \
+ if (dev->bus->number != hose->first_busno) \
+ cfg_type = 1; \
\
out_be32(hose->cfg_addr, \
- ((offset & 0xfc) << 24) | (dev->devfn << 16) \
- | (dev->bus->number << 8) | 0x80); \
+ (((offset & 0xfc) | cfg_type) << 24) | (dev->devfn << 16) \
+ | ((dev->bus->number - hose->bus_offset) << 8) | 0x80); \
cfg_##rw(val, hose->cfg_data + (offset & mask), type, op); \
return PCIBIOS_SUCCESSFUL; \
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)