Re: [PATCH] RFC: fix ethernet device initialization

2001-03-10 Thread Jeff Garzik
Jes Sorensen wrote: > I don't like the way you declare all the code in obscure macros in > there. > > +#define DECLARE_CHG_MTU(suffix,low,high) \ > + static int suffix##_change_mtu(struct net_device *dev, int new_mtu) \ > .. > > All it does is to make the code harder to read and debug

Re: [PATCH] RFC: fix ethernet device initialization

2001-03-08 Thread Jes Sorensen
> "Jeff" == Jeff Garzik <[EMAIL PROTECTED]> writes: Jeff> People from time to time point out a wart in ethernet Jeff> initialization: The net_device is allocated and registered to Jeff> the system in init_etherdev, which is usually one of the first Jeff> things an ethernet driver probe functi

Re: [PATCH] RFC: fix ethernet device initialization

2001-03-07 Thread Alan Cox
> It'll only take a few days. Do we want? If not, we can > extend the dev_probe_lock() thing to cover probes for > other busses. USB, I guess. cardbus.. usb.. insmod/rmmod I'd like it fixed, but you have to convince DaveM - To unsubscribe from this list: send the line "unsubscribe linux-kerne

Re: [PATCH] RFC: fix ethernet device initialization

2001-03-07 Thread Andrew Morton
Jeff Garzik wrote: > > People from time to time point out a wart in ethernet initialization: > They sure do. You were away at the time, but I had a 94 file, 140k patch late last year which fixed all this. It's at http://www.uow.edu.au/~andrewm/linux/netdevice.patch and the design do

Re: [PATCH] RFC: fix ethernet device initialization

2001-03-07 Thread Jeff Garzik
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_eth

Re: [PATCH] RFC: fix ethernet device initialization

2001-03-07 Thread Arjan van de Ven
In article <[EMAIL PROTECTED]> you wrote: > This bug, which I fix, isn't causing oops AFAIK, just > exporting ugliness to user space etc. It CAN and IS causing oopses. init_etherdev() causes /sbin/hotplug to be invoked, which in turn ifconfig up's the interface. Several (if not all) drivers have

[PATCH] RFC: fix ethernet device initialization

2001-03-07 Thread Jeff Garzik
People from time to time point out a wart in ethernet initialization: The net_device is allocated and registered to the system in init_etherdev, which is usually one of the first things an ethernet driver probe function does. The net_device's final members are setup at some time between then and

Re: [PATCH] RFC: fix ethernet device initialization

2001-03-07 Thread Jeff Garzik
Oh, it should be noted that since this is intended as a stable 2.4 series change. The patch does not change any existing APIs, only adds a function. Existing 2.4 drivers are free to continue using init_etherdev... This bug, which I fix, isn't causing oops AFAIK, just exporting ugliness to user