From: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: linux-kernel@vger.kernel.org
Subject: [patch] 2.5.18: unnamed PCI bus resources
Date: Tue, 28 May 2002 19:54:45 +0400 [thread overview]
Message-ID: <20020528195445.A5419@jurassic.park.msu.ru> (raw)
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;
}
reply other threads:[~2002-05-28 15:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020528195445.A5419@jurassic.park.msu.ru \
--to=ink@jurassic.park.msu.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).