lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.SOC.1.00.1010022056000.27121@math.ut.ee>
Date:	Sat, 2 Oct 2010 21:35:15 +0300 (EEST)
From:	Meelis Roos <mroos@...ux.ee>
To:	netdev@...r.kernel.org
Subject: [PATCH] ibmtr: fix tr%d in dmesg

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>

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@...x", 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@...ux.ee)
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ