Re: [PATCH] network driver updates

2001-02-15 Thread Andrew Morton
David Hinds wrote: > > On Thu, Feb 15, 2001 at 10:49:22PM +1100, Andrew Morton wrote: > > > > Now, the thing I don't understand about David's design is the > > final one. What 3c575_cb does is: > > > > CONFIG_HOTPLUG=y, MODULE=true > > If the hardware isn't there, register the driver

Re: [PATCH] network driver updates

2001-02-15 Thread David Hinds
On Thu, Feb 15, 2001 at 10:49:22PM +1100, Andrew Morton wrote: > > Now, the thing I don't understand about David's design is the > final one. What 3c575_cb does is: > > CONFIG_HOTPLUG=y, MODULE=true > If the hardware isn't there, register the driver and > hang around. > >

Re: [PATCH] network driver updates

2001-02-15 Thread Andrew Morton
Manfred Spraul wrote: > > David Hinds wrote: > > > > Say the driver is linked into the kernel. Hot plug drivers should not > > all complain about not finding their hardware. > > > > That's handled by pci_module_init(), check : > if CONFIG_HOTPLUG is enabled, then pci_module_init() never

Re: [PATCH] network driver updates

2001-02-15 Thread Andrew Morton
Manfred Spraul wrote: David Hinds wrote: Say the driver is linked into the kernel. Hot plug drivers should not all complain about not finding their hardware. That's handled by pci_module_init(), check linux/pci.h: if CONFIG_HOTPLUG is enabled, then pci_module_init() never returns

Re: [PATCH] network driver updates

2001-02-15 Thread David Hinds
On Thu, Feb 15, 2001 at 10:49:22PM +1100, Andrew Morton wrote: Now, the thing I don't understand about David's design is the final one. What 3c575_cb does is: CONFIG_HOTPLUG=y, MODULE=true If the hardware isn't there, register the driver and hang around. Why?

Re: [PATCH] network driver updates

2001-02-15 Thread Andrew Morton
David Hinds wrote: On Thu, Feb 15, 2001 at 10:49:22PM +1100, Andrew Morton wrote: Now, the thing I don't understand about David's design is the final one. What 3c575_cb does is: CONFIG_HOTPLUG=y, MODULE=true If the hardware isn't there, register the driver and

Re: [PATCH] network driver updates

2001-02-14 Thread Manfred Spraul
David Hinds wrote: > > Say the driver is linked into the kernel. Hot plug drivers should not > all complain about not finding their hardware. > That's handled by pci_module_init(), check : if CONFIG_HOTPLUG is enabled, then pci_module_init() never returns with -ENODEV. Which means that eisa

Re: [PATCH] network driver updates

2001-02-14 Thread Jeff Garzik
On Wed, 14 Feb 2001, David Hinds wrote: > On Thu, Feb 15, 2001 at 12:33:43AM +1100, Andrew Morton wrote: > > > > > * something is wrong in the vortex initialization: I don't have such a > > > card, but the driver didn't return an error message on insmod. I'm not > > > sure if my fix is correct.

Re: [PATCH] network driver updates

2001-02-14 Thread David Hinds
On Thu, Feb 15, 2001 at 12:33:43AM +1100, Andrew Morton wrote: > > > * something is wrong in the vortex initialization: I don't have such a > > card, but the driver didn't return an error message on insmod. I'm not > > sure if my fix is correct. > > That was intentional - dhinds suggested that

Re: [PATCH] network driver updates

2001-02-14 Thread Arnaldo Carvalho de Melo
Em Wed, Feb 14, 2001 at 05:54:34AM -0600, Jeff Garzik escreveu: > On Wed, 14 Feb 2001, Manfred Spraul wrote: > > * dev->mem_start: NULL means "not command line configuration" 0x > > means "default". > > several drivers only check for NULL, not for 0x. > > netdev->mem_start is

Re: [PATCH] network driver updates

2001-02-14 Thread Andrew Morton
Manfred Spraul wrote: > > I found 2 bugs in several network drivers: > > * dev->mem_start: NULL means "not command line configuration" 0x > means "default". > several drivers only check for NULL, not for 0x. I think that's worth another "ewww...", don't you? > * something is

Re: [PATCH] network driver updates

2001-02-14 Thread Jeff Garzik
On Wed, 14 Feb 2001, Manfred Spraul wrote: > * something is wrong in the vortex initialization: I don't have such a > card, but the driver didn't return an error message on insmod. I'm not > sure if > my fix is correct. > @@ -2661,9 +2661,12 @@ > > rc = pci_module_init(_driver); >

Re: [PATCH] network driver updates

2001-02-14 Thread Jeff Garzik
On Wed, 14 Feb 2001, Manfred Spraul wrote: > * dev->mem_start: NULL means "not command line configuration" 0x > means "default". > several drivers only check for NULL, not for 0x. netdev->mem_start is unsigned long... Should the test be for ~0 instead? The value 0x seems

[PATCH] network driver updates

2001-02-14 Thread Manfred Spraul
I found 2 bugs in several network drivers: * dev->mem_start: NULL means "not command line configuration" 0x means "default". several drivers only check for NULL, not for 0x. * incorrect bounds checks for phy_idx: 2 entries in the structure, but up to 4 are initialized. *

[PATCH] network driver updates

2001-02-14 Thread Manfred Spraul
I found 2 bugs in several network drivers: * dev-mem_start: NULL means "not command line configuration" 0x means "default". several drivers only check for NULL, not for 0x. * incorrect bounds checks for phy_idx: 2 entries in the structure, but up to 4 are initialized. *

Re: [PATCH] network driver updates

2001-02-14 Thread Jeff Garzik
On Wed, 14 Feb 2001, Manfred Spraul wrote: * dev-mem_start: NULL means "not command line configuration" 0x means "default". several drivers only check for NULL, not for 0x. netdev-mem_start is unsigned long... Should the test be for ~0 instead? The value 0x seems wrong

Re: [PATCH] network driver updates

2001-02-14 Thread Jeff Garzik
On Wed, 14 Feb 2001, Manfred Spraul wrote: * something is wrong in the vortex initialization: I don't have such a card, but the driver didn't return an error message on insmod. I'm not sure if my fix is correct. @@ -2661,9 +2661,12 @@ rc = pci_module_init(vortex_driver);

Re: [PATCH] network driver updates

2001-02-14 Thread Andrew Morton
Manfred Spraul wrote: I found 2 bugs in several network drivers: * dev-mem_start: NULL means "not command line configuration" 0x means "default". several drivers only check for NULL, not for 0x. I think that's worth another "ewww...", don't you? * something is wrong in

Re: [PATCH] network driver updates

2001-02-14 Thread Arnaldo Carvalho de Melo
Em Wed, Feb 14, 2001 at 05:54:34AM -0600, Jeff Garzik escreveu: On Wed, 14 Feb 2001, Manfred Spraul wrote: * dev-mem_start: NULL means "not command line configuration" 0x means "default". several drivers only check for NULL, not for 0x. netdev-mem_start is unsigned

Re: [PATCH] network driver updates

2001-02-14 Thread David Hinds
On Thu, Feb 15, 2001 at 12:33:43AM +1100, Andrew Morton wrote: * something is wrong in the vortex initialization: I don't have such a card, but the driver didn't return an error message on insmod. I'm not sure if my fix is correct. That was intentional - dhinds suggested that if the

Re: [PATCH] network driver updates

2001-02-14 Thread Jeff Garzik
On Wed, 14 Feb 2001, David Hinds wrote: On Thu, Feb 15, 2001 at 12:33:43AM +1100, Andrew Morton wrote: * something is wrong in the vortex initialization: I don't have such a card, but the driver didn't return an error message on insmod. I'm not sure if my fix is correct. That

Re: [PATCH] network driver updates

2001-02-14 Thread Manfred Spraul
David Hinds wrote: Say the driver is linked into the kernel. Hot plug drivers should not all complain about not finding their hardware. That's handled by pci_module_init(), check linux/pci.h: if CONFIG_HOTPLUG is enabled, then pci_module_init() never returns with -ENODEV. Which means that