Re: 2.5.20 tulip bogosities

From: Jeff Garzik (jgarzik@mandrakesoft.com)
Date: Fri Jun 07 2002 - 12:17:55 EST


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/



This archive was generated by hypermail 2b29 : Fri Jun 07 2002 - 22:00:30 EST