All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Anton Blanchard <anton@samba.org>
Cc: netdev@oss.sgi.com, cramerj@intel.com, john.ronciak@intel.com,
	ganesh.venkatesan@intel.com, jonmason@us.ibm.com,
	jkenisto@us.ibm.com
Subject: Re: Network device driver probe issues
Date: Thu, 15 Jul 2004 19:34:15 -0400	[thread overview]
Message-ID: <40F71477.2020408@pobox.com> (raw)
In-Reply-To: <20040715135244.GD27715@krispykreme>

Anton Blanchard wrote:
> The e1000 gets around this by replicating register_netdev:
> 
>         rtnl_lock();
>         /* we need to set the name early since the DPRINTK macro needs it set */
>         if (dev_alloc_name(netdev, netdev->name) < 0)
>                 goto err_free_unlock;
> 
> ...
> 
>         /* since we are holding the rtnl lock already, call the no-lock version */
>         if((err = register_netdevice(netdev)))
>                 goto err_register;
> 
>         cards_found++;
>         rtnl_unlock();
> 
> 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

  reply	other threads:[~2004-07-15 23:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-15 13:52 Network device driver probe issues Anton Blanchard
2004-07-15 23:34 ` Jeff Garzik [this message]
2004-07-16  1:04   ` Jim Keniston
2004-07-16  4:49     ` David Dillow
2004-07-16 18:26       ` Jim Keniston
  -- strict thread matches above, loose matches on Subject: below --
2004-07-16 19:15 Venkatesan, Ganesh
2004-07-16 19:52 ` Jeff Garzik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40F71477.2020408@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=anton@samba.org \
    --cc=cramerj@intel.com \
    --cc=ganesh.venkatesan@intel.com \
    --cc=jkenisto@us.ibm.com \
    --cc=john.ronciak@intel.com \
    --cc=jonmason@us.ibm.com \
    --cc=netdev@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.