All of lore.kernel.org
 help / color / mirror / Atom feed
* Naming devices
@ 2003-05-18 21:33 Anton Blanchard
  2003-05-18 22:36 ` Russell King
  2003-05-19  1:22 ` Daniel Stekloff
  0 siblings, 2 replies; 5+ messages in thread
From: Anton Blanchard @ 2003-05-18 21:33 UTC (permalink / raw)
  To: linux-kernel


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-05-19  3:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-18 21:33 Naming devices Anton Blanchard
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.