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 - 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 : Wed Mar 07 2001 - 21:00:24 EST