public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@mandrakesoft.com>
To: Andrew Morton <andrewm@uow.edu.au>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	netdev@oss.sgi.com, Linus Torvalds <torvalds@transmeta.com>,
	"David S. Miller" <davem@redhat.com>
Subject: Re: PATCH 2.4.3.6: fix netdevice initialization
Date: Wed, 21 Mar 2001 10:41:00 -0500	[thread overview]
Message-ID: <3AB8CB8C.D055FC6E@mandrakesoft.com> (raw)
In-Reply-To: <3AB8BA16.A25C0929@mandrakesoft.com> <3AB8C6EE.5EF6BA90@uow.edu.au>

Andrew Morton wrote:
> We should propagate dev_alloc_name's return value:
> And register_netdevice's, so

ok


> More significantly, the driver probe functions now become:
> 
> xxx_probe()
> {
>         dev = alloc_etherdev(sizeof(xxx_private));
>         ...
>         printk(KERN_INFO "%s: stuff\n", dev->name);
>         ...
>         ret = register_netdev(dev);
>         if (ret < 0)
>                 kfree(ret);
>         return ret;
> }
> 
> yes?

correct.


> And the printk() will say "eth%d: stuff", so we'll need to
> change the messages:
> 
> -       printk(KERN_INFO "%s: stuff\n", dev->name);
> +       printk(KERN_INFO "xxx: stuff\n");
> 
> Correct?

correct.  For PCI drivers, change to something like

  printk(KERN_INFO "tulip(%s): stuff\n", pci_dev->slot_name);

> My quibble with this is things like wait_for_completion(),
> which are called from both the probe() function and
> the mainline driver code.  These also print dev->name,
> and there's no obvious fix for that.

hrm.  I'm not sure it's necessary to pass driver_name to alloc_etherdev
(to set dev->name), just to be able to reference solely from the driver
during the probe phase.  Further there is a dev->name size limit you
will run into with "myverylongdrivernameskimbosh."

Just pass 'name' arg to wait_for_completion ;-)

-- 
Jeff Garzik       | May you have warm words on a cold evening,
Building 1024     | a full mooon on a dark night,
MandrakeSoft      | and a smooth road all the way to your door.

      reply	other threads:[~2001-03-21 15:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-21 14:26 PATCH 2.4.3.6: fix netdevice initialization Jeff Garzik
2001-03-21 14:33 ` Jeff Garzik
2001-03-21 15:21 ` Andrew Morton
2001-03-21 15:41   ` Jeff Garzik [this message]

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=3AB8CB8C.D055FC6E@mandrakesoft.com \
    --to=jgarzik@mandrakesoft.com \
    --cc=andrewm@uow.edu.au \
    --cc=davem@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@oss.sgi.com \
    --cc=torvalds@transmeta.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox