Re: [PATCH] - 2.4.16 ns83820 optical support (Netgear GA621)

Jeff Garzik (jgarzik@mandrakesoft.com)
Wed, 05 Dec 2001 07:55:39 -0500


Michael Clark wrote:
> > are references to dev->net_dev.name valid before
> > register_netdev(&dev->net_dev) in ns83820_init_one()?
>
> Okay, so i'll move the register_netdev call earlier on in the
> initialisation and add any necessary unregister call for failures.

Not a solution but more of a problem... a user might see:

eth0: startup message
eth0: startup message
{failure, unregisters eth0}
eth0: startup message
eth0: startup message
{failure, unregisters eth0}
eth0: startup message
eth0: startup message
{failure, unregisters eth0}

That's particularly messy to diagnose when eth0 may not really be eth0.
Further in a hotplug multi-threaded world you are reserving an ethernet
interface which may not be used.

I greatly prefer assigning board numbers (ns83820_0, ns83820_0, or ns0,
ns1, ns2) temporarily until you are sure you can register the interface
with the likelihood it will not be unregistered until module removal
time, or never [if built into kernel].

Jeff

-- 
Jeff Garzik      | Only so many songs can be sung
Building 1024    | with two lips, two lungs, and one tongue.
MandrakeSoft     |         - nomeansno

- 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/