From: Anton Blanchard <anton@samba.org>
To: linux-kernel@vger.kernel.org
Subject: Naming devices
Date: Mon, 19 May 2003 07:33:59 +1000 [thread overview]
Message-ID: <20030518213358.GE8994@krispykreme> (raw)
Hi,
I just spent 2 hours trying to make a machine boot. It had one bad disk
and one bad network card. Normally not a problem, but this thing had 40
cards in it so identifying the problem ones was not straight forward.
I was wondering why we dont have a consistent way of printing a device
location? If all drivers used the same thing, eg:
struct pci_dev *foo;
...
printf("%s: could not enable card\n", PCI_LOCATION(foo));
Which by default would print pci bus/devfn and an arch could override eg
on ppc64 it would also print a location code:
U1.6-P1-I2/E1 (90:0c.0)
This sounds like the domain of the event logging guys but I havent seen
anything from them in a while. The nice thing about this is that when we
get pci domains nothing needs to be changed in the driver, we just
update the PCI_LOCATION macro.
Also the tendency of network drivers to print "eth0: foo" during
initialisation is even more of a problem. If you get a bad card then you
could end up reusing the eth0 name for a subsequent device, making
pinpointing the problem card difficult. On top of that some drivers use
dev->name between calling alloc_netdev() and register_netdev() so that
you end up with error messages like "eth%d: failed".
Anton
next reply other threads:[~2003-05-18 21:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-18 21:33 Anton Blanchard [this message]
2003-05-18 22:36 ` Russell King
2003-05-19 3:40 ` Anton Blanchard
2003-05-19 1:22 ` Daniel Stekloff
2003-05-19 1:48 ` David S. Miller
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=20030518213358.GE8994@krispykreme \
--to=anton@samba.org \
--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
all inboxes | Powered by JetHome®