patch-2.4.5 linux/arch/alpha/kernel/pci.c
Next file: linux/arch/alpha/kernel/pci_impl.h
Previous file: linux/arch/alpha/kernel/entry.S
Back to the patch index
Back to the overall index
- Lines: 47
- Date:
Mon May 21 13:38:41 2001
- Orig file:
v2.4.4/linux/arch/alpha/kernel/pci.c
- Orig date:
Fri Mar 2 11:12:07 2001
diff -u --recursive --new-file v2.4.4/linux/arch/alpha/kernel/pci.c linux/arch/alpha/kernel/pci.c
@@ -156,7 +156,7 @@
else if (res->flags & IORESOURCE_MEM) {
/* Make sure we start at our min on all hoses */
if (start - hose->mem_space->start < PCIBIOS_MIN_MEM)
- start = PCIBIOS_MIN_MEM + hose->io_space->start;
+ start = PCIBIOS_MIN_MEM + hose->mem_space->start;
/*
* The following holds at least for the Low Cost
@@ -441,15 +441,15 @@
if (hose->index == bus) break;
if (!hose) return -ENODEV;
} else {
- /* Special hook for ISA access. */
- if (bus == 0 && dfn == 0) {
- hose = pci_isa_hose;
- } else {
- dev = pci_find_slot(bus, dfn);
- if (!dev)
- return -ENODEV;
- hose = dev->sysdata;
- }
+ /* Special hook for ISA access. */
+ if (bus == 0 && dfn == 0) {
+ hose = pci_isa_hose;
+ } else {
+ dev = pci_find_slot(bus, dfn);
+ if (!dev)
+ return -ENODEV;
+ hose = dev->sysdata;
+ }
}
switch (which & ~IOBASE_FROM_HOSE) {
@@ -468,4 +468,12 @@
}
return -EOPNOTSUPP;
+}
+
+/* Return the index of the PCI controller for device PDEV. */
+int
+pci_controller_num(struct pci_dev *pdev)
+{
+ struct pci_controller *hose = pdev->sysdata;
+ return (hose ? hose->index : -ENXIO);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)