All of lore.kernel.org
 help / color / mirror / Atom feed
* [Kernel-janitors] Re: 2.6.6: smc-ultra: eth%d message
@ 2004-05-29  8:05 Roger Luethi
  2004-05-31  6:57 ` Németh Márton
  0 siblings, 1 reply; 2+ messages in thread
From: Roger Luethi @ 2004-05-29  8:05 UTC (permalink / raw)
  To: kernel-janitors

On Fri, 28 May 2004 10:27:30 +0200, Németh Márton wrote:
> When I'm loading smc-ultra module with 'modprobe -k smc_ultra' using
> Linux 2.6.6 I get the following message in 'dmesg':
> 
> smc-ultra.c: Presently autoprobing (not recommended) for a single card.
> smc-ultra.c: No ISAPnP cards found, trying standard ones...
> smc-ultra.c:v2.02 2/3/98 Donald Becker (becker@cesdis.gsfc.nasa.gov)
> eth%d: SMC Ultra at 0x280, 00 00 C0 78 C5 B6, IRQ 3 memory 0xd0000-0xd3fff.
> 
> Using Linux kernel 2.4.25 the last line was correct, like this:
> eth0: SMC Ultra at 0x280, 00 00 C0 78 C5 B6, IRQ 3 memory 0xd0000-0xd3fff.
> 
> I think the printk() in linux-2.6.6/drivers/net/smc-ultra.c:243 is buggy,
> but I do not have the knowledge how to correct this.

There are several drivers in 2.6 that use dev->name before calling
register_netdev(), which results in the "eth%d" messages you are seeing.
I've noticed this with mace.c as well (2.6.5 IIRC).

Maybe some KJ would like to pick that up?

Roger
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Kernel-janitors] Re: 2.6.6: smc-ultra: eth%d message
  2004-05-29  8:05 [Kernel-janitors] Re: 2.6.6: smc-ultra: eth%d message Roger Luethi
@ 2004-05-31  6:57 ` Németh Márton
  0 siblings, 0 replies; 2+ messages in thread
From: Németh Márton @ 2004-05-31  6:57 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: TEXT/PLAIN, Size: 2432 bytes --]

Hi!

I tried to write a 'Smatch' ( http://smatch.sourceforge.net/ ) script to
help searching for the problem below.

The question that the script would check is that is any
'struct net_device'.'name' accessed by any read-out expression before
calling register_netdev().

It seems to me that 'Smatch' does not provide enough information for this:

----------------------------------------------------------------
linux-2.6.6/drivers/net/smc-ultra.c:243 is:
    printk("%s: %s at %#3x,", dev->name, model_name, ioaddr);

smc-ultra.c.sm contains:
SM drivers/net/smc-ultra.c 243 expr_stmt call_expr((addr_expr function_decl(printk))(tree_list: addr_expr string_cst(""%s: %s at %#3x,""), non_lvalue_expr parm_decl(dev), var_decl(model_name), parm_decl(ioaddr)))
----------------------------------------------------------------


and the pointer type of 'dev' is also not known:

----------------------------------------------------------------
linux-2.6.6/drivers/net/smc-ultra.c:206 is:
static int __init ultra_probe1(struct net_device *dev, int ioaddr)

smc-ultra.c.sm:
SM drivers/net/smc-ultra.c 207 function_decl integer_type function_decl(ultra_probe1)(pointer_type(parm_decl(dev)), integer_type(parm_decl(ioaddr)))
----------------------------------------------------------------

Is it possible to update 'Smatch' to let the check possible?

	NMarci


On Sat, 29 May 2004, Roger Luethi wrote:

> On Fri, 28 May 2004 10:27:30 +0200, Németh Márton wrote:
> > When I'm loading smc-ultra module with 'modprobe -k smc_ultra' using
> > Linux 2.6.6 I get the following message in 'dmesg':
> >
> > smc-ultra.c: Presently autoprobing (not recommended) for a single card.
> > smc-ultra.c: No ISAPnP cards found, trying standard ones...
> > smc-ultra.c:v2.02 2/3/98 Donald Becker (becker@cesdis.gsfc.nasa.gov)
> > eth%d: SMC Ultra at 0x280, 00 00 C0 78 C5 B6, IRQ 3 memory 0xd0000-0xd3fff.
> >
> > Using Linux kernel 2.4.25 the last line was correct, like this:
> > eth0: SMC Ultra at 0x280, 00 00 C0 78 C5 B6, IRQ 3 memory 0xd0000-0xd3fff.
> >
> > I think the printk() in linux-2.6.6/drivers/net/smc-ultra.c:243 is buggy,
> > but I do not have the knowledge how to correct this.
>
> There are several drivers in 2.6 that use dev->name before calling
> register_netdev(), which results in the "eth%d" messages you are seeing.
> I've noticed this with mace.c as well (2.6.5 IIRC).




[-- Attachment #2: Type: text/plain, Size: 167 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-05-31  6:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-29  8:05 [Kernel-janitors] Re: 2.6.6: smc-ultra: eth%d message Roger Luethi
2004-05-31  6:57 ` Németh Márton

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.