patch-2.4.0-test5 linux/arch/alpha/kernel/pci.c
Next file: linux/arch/alpha/kernel/setup.c
Previous file: linux/arch/alpha/kernel/osf_sys.c
Back to the patch index
Back to the overall index
- Lines: 33
- Date:
Tue Jul 18 22:58:28 2000
- Orig file:
v2.4.0-test4/linux/arch/alpha/kernel/pci.c
- Orig date:
Mon Jul 10 16:47:18 2000
diff -u --recursive --new-file v2.4.0-test4/linux/arch/alpha/kernel/pci.c linux/arch/alpha/kernel/pci.c
@@ -535,6 +535,12 @@
struct pci_controler *hose;
struct pci_dev *dev;
+ /* from hose or from bus.devfn */
+ if (which & IOBASE_FROM_HOSE) {
+ for(hose = hose_head; hose; hose = hose->next)
+ if (hose->index == bus) break;
+ if (!hose) return -ENODEV;
+ } else {
/* Special hook for ISA access. */
if (bus == 0 && dfn == 0) {
hose = pci_isa_hose;
@@ -544,8 +550,9 @@
return -ENODEV;
hose = dev->sysdata;
}
+ }
- switch (which) {
+ switch (which & ~IOBASE_FROM_HOSE) {
case IOBASE_HOSE:
return hose->index;
case IOBASE_SPARSE_MEM:
@@ -556,6 +563,8 @@
return hose->sparse_io_base;
case IOBASE_DENSE_IO:
return hose->dense_io_base;
+ case IOBASE_ROOT_BUS:
+ return hose->bus->number;
}
return -EOPNOTSUPP;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)