summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorIvan Kokshaysky <ink@jurassic.park.msu.ru>2003-07-31 20:58:44 -0700
committerRichard Henderson <rth@kanga.twiddle.net>2003-07-31 20:58:44 -0700
commit08e8ead7bfa6cf2389de0314be02af69b61ec8eb (patch)
tree47c78dd31d961c5cf6748d2c8cdcc35ecdc2d6f2 /include
parent3a2b95149c36cb27d808ad90f9f3acb50dec1e08 (diff)
[PATCH] alpha: pci domains update
- fix thinko in pci_name_bus (pointed out by DaveM); - prevent 8-bit bus number overflow inside the hose; - remove first_busno/last_busno fields from struct pci_controller, as it's a duplicate of the info in associated struct pci_bus. Ivan.
Diffstat (limited to 'include')
-rw-r--r--include/asm-alpha/pci.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/asm-alpha/pci.h b/include/asm-alpha/pci.h
index b203d40b9282..2289a5350d41 100644
--- a/include/asm-alpha/pci.h
+++ b/include/asm-alpha/pci.h
@@ -37,8 +37,9 @@ struct pci_controller {
unsigned long config_space_base;
unsigned int index;
- unsigned int first_busno;
- unsigned int last_busno;
+ /* For compatibility with current (as of July 2003) pciutils
+ and XFree86. Eventually will be removed. */
+ unsigned int need_domain_info;
struct pci_iommu_arena *sg_pci;
struct pci_iommu_arena *sg_isa;
@@ -194,15 +195,14 @@ pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
#define pci_domain_nr(bus) ((struct pci_controller *)(bus)->sysdata)->index
-/* Bus number == domain number until we get above 256 busses */
static inline int pci_name_bus(char *name, struct pci_bus *bus)
{
- int domain = pci_domain_nr(bus);
+ struct pci_controller *hose = bus->sysdata;
- if (domain < 256) {
- sprintf(name, "%02x", domain);
+ if (likely(hose->need_domain_info == 0)) {
+ sprintf(name, "%02x", bus->number);
} else {
- sprintf(name, "%04x:%02x", domain, bus->number);
+ sprintf(name, "%04x:%02x", hose->index, bus->number);
}
return 0;
}