Re: 2.5.20 tulip bogosities

Jeff Garzik (jgarzik@mandrakesoft.com)
Fri, 07 Jun 2002 13:17:55 -0400


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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/