* [patch] 2.5.18: unnamed PCI bus resources
@ 2002-05-28 15:54 Ivan Kokshaysky
0 siblings, 0 replies; only message in thread
From: Ivan Kokshaysky @ 2002-05-28 15:54 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-kernel
As pointed out by Russell King, resource name pointers
of the secondary PCI buses are left uninitialized in the
non-x86 PCI allocation path.
Assigning these pointers in pci_add_new_bus() fixes the problem.
Ivan.
--- 2.5.18/drivers/pci/probe.c Sat May 25 05:55:20 2002
+++ linux/drivers/pci/probe.c Tue May 28 15:52:05 2002
@@ -151,7 +151,6 @@ void __devinit pci_read_bridge_bases(str
res->flags = (io_base_lo & PCI_IO_RANGE_TYPE_MASK) | IORESOURCE_IO;
res->start = base;
res->end = limit + 0xfff;
- res->name = child->name;
} else {
/*
* Ugh. We don't know enough about this bridge. Just assume
@@ -170,7 +169,6 @@ void __devinit pci_read_bridge_bases(str
res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM;
res->start = base;
res->end = limit + 0xfffff;
- res->name = child->name;
} else {
/* See comment above. Same thing */
printk(KERN_ERR "Unknown bridge resource %d: assuming transparent\n", 1);
@@ -201,7 +199,6 @@ void __devinit pci_read_bridge_bases(str
res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM | IORESOURCE_PREFETCH;
res->start = base;
res->end = limit + 0xfffff;
- res->name = child->name;
} else {
/* See comments above */
printk(KERN_ERR "Unknown bridge resource %d: assuming transparent\n", 2);
@@ -248,9 +245,11 @@ struct pci_bus * __devinit pci_add_new_b
child->primary = parent->secondary;
child->subordinate = 0xff;
- /* Set up default resource pointers.. */
- for (i = 0; i < 4; i++)
+ /* Set up default resource pointers and names.. */
+ for (i = 0; i < 4; i++) {
child->resource[i] = &dev->resource[PCI_BRIDGE_RESOURCES+i];
+ child->resource[i]->name = child->name;
+ }
return child;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-05-28 15:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-28 15:54 [patch] 2.5.18: unnamed PCI bus resources Ivan Kokshaysky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).