| To: | Linux Knernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH] RFC: fix ethernet device initialization |
| From: | Jeff Garzik <jgarzik@xxxxxxxxxxxxxxxx> |
| Date: | Wed, 07 Mar 2001 17:16:57 -0500 |
| Cc: | netdev@xxxxxxxxxxx |
| Organization: | MandrakeSoft |
| References: | <3AA6A570.57FF2D36@xxxxxxxxxxxxxxxx> |
| Sender: | owner-netdev@xxxxxxxxxxx |
Jeff Garzik wrote:
> Our API already supports a solution -- setup the device, then call
> register_netdev. The patch below adds a helper, alloc_etherdev, to
> eliminate duplicate code in drivers. Ethernet device initialization,
> after the patch, should now look like
>
> dev = alloc_etherdev(sizeof(struct netdev_private));
> ... initialize device ...
> ... set up net_device struct members ...
> rc = register_netdevice(dev);
> if (rc) /* handle error */
> netif_start_queue(dev);
Think-o in my example: netif_start_queue occurs in dev->open(), not in
the probe phase. Simply ignore that line in the example and you are ok.
Jeff
--
Jeff Garzik | "You see, in this world there's two kinds of
Building 1024 | people, my friend: Those with loaded guns
MandrakeSoft | and those who dig. You dig." --Blondie
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH] RFC: fix ethernet device initialization, Jeff Garzik |
|---|---|
| Next by Date: | How to get bandwidth value from an interface, pop.erols.com |
| Previous by Thread: | Re: [PATCH] RFC: fix ethernet device initialization, Jeff Garzik |
| Next by Thread: | Re: [PATCH] RFC: fix ethernet device initialization, Andrew Morton |
| Indexes: | [Date] [Thread] [Top] [All Lists] |