From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PCI changes and fixes for 2.5.72
Date: Thu, 19 Jun 2003 16:39:30 -0700 [thread overview]
Message-ID: <1056065970863@kroah.com> (raw)
In-Reply-To: <1056065969234@kroah.com>
ChangeSet 1.1327.5.2, 2003/06/16 16:44:06-07:00, willy@debian.org
[PATCH] PCI: Unconfuse /proc
If we are to cope with multiple domains with clashing PCI bus numbers,
we must refrain from creating two directories of the same name in
/proc/bus/pci. This is one solution to the problem; busses with a
non-zero domain number get it prepended.
Alternative solutions include cowardly refusing to create non-domain-zero
bus directories, refusing to create directories with clashing names, and
sticking our heads in the sand and pretending the problem doesn't exist.
drivers/pci/proc.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletion(-)
diff -Nru a/drivers/pci/proc.c b/drivers/pci/proc.c
--- a/drivers/pci/proc.c Thu Jun 19 16:32:21 2003
+++ b/drivers/pci/proc.c Thu Jun 19 16:32:21 2003
@@ -383,7 +383,11 @@
return -EACCES;
if (!(de = bus->procdir)) {
- sprintf(name, "%02x", bus->number);
+ if (pci_domain_nr(bus) == 0) {
+ sprintf(name, "%02x", bus->number);
+ } else {
+ sprintf(name, "%04x:%02x", pci_domain_nr(bus), bus->number);
+ }
de = bus->procdir = proc_mkdir(name, proc_bus_pci_dir);
if (!de)
return -ENOMEM;
next prev parent reply other threads:[~2003-06-19 23:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-19 23:37 [BK PATCH] PCI changes and fixes for 2.5.72 Greg KH
2003-06-19 23:39 ` [PATCH] " Greg KH
2003-06-19 23:39 ` Greg KH [this message]
2003-06-19 23:39 ` Greg KH
2003-06-19 23:39 ` Greg KH
2003-06-19 23:39 ` Greg KH
2003-06-19 23:39 ` Greg KH
2003-06-19 23:39 ` Greg KH
2003-06-19 23:39 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2003-06-20 15:44 Albert Cahalan
2003-06-20 18:35 ` Greg KH
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=1056065970863@kroah.com \
--to=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
/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