From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Dillow Subject: Re: Network device driver probe issues Date: 16 Jul 2004 00:49:04 -0400 Sender: netdev-bounce@oss.sgi.com Message-ID: <1089953344.23577.15.camel@ori.thedillows.org> References: <20040715135244.GD27715@krispykreme> <40F71477.2020408@pobox.com> <1089939860.1709.70.camel@ibm-ni9dztukfq8.beaverton.ibm.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: Jeff Garzik , Anton Blanchard , Netdev , cramerj@intel.com, john.ronciak@intel.com, ganesh.venkatesan@intel.com, jonmason@us.ibm.com Return-path: To: Jim Keniston In-Reply-To: <1089939860.1709.70.camel@ibm-ni9dztukfq8.beaverton.ibm.com> Errors-to: netdev-bounce@oss.sgi.com List-Id: netdev.vger.kernel.org On Thu, 2004-07-15 at 21:04, Jim Keniston wrote: > On Thu, 2004-07-15 at 16:34, Jeff Garzik wrote: [snip] > > > 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 In the typhoon driver, I have tp->name, and most everything that prints info/errors about the card use it. During probing, it is initially set to point to pci_name(), and once registered, it gets pointed to netdev->name. This seems fairly clean, though maybe a bit redundant. Dave