[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20101003.205632.104074109.davem@davemloft.net>
Date: Sun, 03 Oct 2010 20:56:32 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: mroos@...ux.ee
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH] ibmtr: fix tr%d in dmesg
From: Meelis Roos <mroos@...ux.ee>
Date: Sat, 2 Oct 2010 21:35:15 +0300 (EEST)
> ibmtr and ibmtr_cs show tr%d in dmesg after alloc_netdev() but before
> register_netdev(). Fix it like e100 does - put a different name into
> dev->name until the device gets registered. I/O port seems to be unique
> enough and is available for the time of printk messages. With the fix,
> dmesg shows
>
> ibmtr@...0: ISA P&P 16/4 Adapter/A (short) | 16/4 ISA-16 Adapter found
> ibmtr@...0: using irq 3, PIOaddr a20, 64K shared RAM.
> ibmtr@...0: Hardware address : 00:40:aa:a9:03:98
> ibmtr@...0: Shared RAM paging disabled. ti->page_mask 0
> ibmtr@...0: Maximum Receive Internet Protocol MTU 16Mbps: 16344, 4Mbps: 6104
> tr0: port 0xa20, irq 3, mmio 0xd4850000, sram 0xd0000, hwaddr=00:40:aa:a9:03:98
>
> Signed-off-by: Meelis Roos <mroos@...ux.ee>
That may be how e100 does it, but this is a very ugly hack and
an abuse of netdev->name
Instead, the more correct way to fit this is to use dev_info(),
dev_err(), and friends. It will both print the correct stuff,
and also document the probing path messages that occur before
the net device is registered.
So please correct the prolem that way, thank you.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists