netdev
[Top] [All Lists]

Re: Network device driver probe issues

To: Jeff Garzik <jgarzik@xxxxxxxxx>
Subject: Re: Network device driver probe issues
From: Jim Keniston <jkenisto@xxxxxxxxxx>
Date: 15 Jul 2004 18:04:20 -0700
Cc: Anton Blanchard <anton@xxxxxxxxx>, netdev@xxxxxxxxxxx, cramerj@xxxxxxxxx, john.ronciak@xxxxxxxxx, ganesh.venkatesan@xxxxxxxxx, jonmason@xxxxxxxxxx, Jim Keniston <jkenisto@xxxxxxxxxx>
In-reply-to: <40F71477.2020408@xxxxxxxxx>
Organization:
References: <20040715135244.GD27715@krispykreme> <40F71477.2020408@xxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
On Thu, 2004-07-15 at 16:34, Jeff Garzik wrote:
> Anton Blanchard wrote:
> > The e1000 gets around this by replicating register_netdev:
> > 
> > [snipped]
> > 
> > The problem I have with this method has to do with how failures appear
> > to the user. If you have two network cards and the first one fails
> > during probe you will see:
> 
> Agreed, this is a hack and strongly discouraged.
> 
> Hopefully Intel will hear this and send me a patch to fix... :)
> 
> 
> > We should instead use something stable to attach to printks during
> > probe. pci_name() is the obvious choice, perhaps using dev_printk().
> > The failure then becomes:
> > 
> > 0000:01:01.0 Intel(R) PRO/1000 Network Connection
> > 0000:01:01.0 The EEPROM Checksum Is Not Valid
> > 0000:02:01.0 Intel(R) PRO/1000 Network Connection
> 
> pci_name() or a simple counter of devices found.  I prefer pci_name()
> 
>       Jeff

Delay registration until the end of the probe, and make DPRINTK smarter.
DPRINTK should check
        adapter->netdev->reg_state == NETREG_REGISTERED
and use the interface name (eth0) if the device is registered, or
pci_name() if it's not.

Jim



<Prev in Thread] Current Thread [Next in Thread>