Re: 2.5.20 tulip bogosities

Jeff Garzik
2002-06-07T17:20:32Z

Thunder from the hill wrote:

>Hi,
>
>On Thu, 6 Jun 2002, Mikael Pettersson wrote:
>
>
>>Also note the obviously broken "eth%d" printk format string.
>>
>>
>
>It's printk("%s: blah\n", dev->name);
>
>

The "eth%d" thing is a format string, but unrelated to printk. The %d
is replaced with the ethernet interface number by the system. That
cosmetic bug is a holdover from olden days, when the ethernet interfaces
would do

register ethernet interface, get a number
if we fail, release the number

So with the old system, it's possible that the user might be

eth0: error cannot load, aborting [first NIC]
eth0: error cannot load, aborting [second NIC]
eth0: error cannot load, aborting [third NIC]

The new system, which is hotplug-friendly, makes it impossible to know
the ethernet interface number until you _really_ are sure the NIC is ok
to use. Therefore, "eth%d" is "dev->name" that has not been translated
yet. The fix is simple, replace "eth%d" with "tulip%d" in the printk
message, and use the board count instead of ethernet interface number.

Jeff