netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ibmtr: fix tr%d in dmesg
@ 2010-10-02 18:35 Meelis Roos
  2010-10-04  3:56 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Meelis Roos @ 2010-10-02 18:35 UTC (permalink / raw)
  To: netdev

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@0a20: ISA P&P 16/4 Adapter/A (short) | 16/4 ISA-16 Adapter found
ibmtr@0a20: using irq 3, PIOaddr a20, 64K shared RAM.
ibmtr@0a20: Hardware address : 00:40:aa:a9:03:98
ibmtr@0a20: Shared RAM paging disabled. ti->page_mask 0
ibmtr@0a20: 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@linux.ee>

diff --git a/drivers/net/tokenring/ibmtr.c b/drivers/net/tokenring/ibmtr.c
index 91e6c78..5de281f 100644
--- a/drivers/net/tokenring/ibmtr.c
+++ b/drivers/net/tokenring/ibmtr.c
@@ -368,6 +368,7 @@ int __devinit ibmtr_probe_card(struct net_device *dev)
 {
 	int err = ibmtr_probe(dev);
 	if (!err) {
+		strcpy(dev->name, "tr%d");
 		err = register_netdev(dev);
 		if (err)
 			ibmtr_cleanup_card(dev);
@@ -699,6 +700,7 @@ static int __devinit ibmtr_probe1(struct net_device *dev, int PIOaddr)
 		printk(version);
 	}
 #endif /* !PCMCIA */
+	sprintf(dev->name, "ibmtr@%04x", PIOaddr);
 	DPRINTK("%s %s found\n",
 		channel_def[cardpresent - 1], adapter_def(ti->adapter_type));
 	DPRINTK("using irq %d, PIOaddr %hx, %dK shared RAM.\n",

-- 
Meelis Roos (mroos@linux.ee)

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

end of thread, other threads:[~2010-10-04 21:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-02 18:35 [PATCH] ibmtr: fix tr%d in dmesg Meelis Roos
2010-10-04  3:56 ` David Miller
2010-10-04 21:12   ` Meelis Roos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).