From: David Miller <davem@davemloft.net>
To: mroos@linux.ee
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] ibmtr: fix tr%d in dmesg
Date: Sun, 03 Oct 2010 20:56:32 -0700 (PDT) [thread overview]
Message-ID: <20101003.205632.104074109.davem@davemloft.net> (raw)
In-Reply-To: <alpine.SOC.1.00.1010022056000.27121@math.ut.ee>
From: Meelis Roos <mroos@linux.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@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>
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.
next prev parent reply other threads:[~2010-10-04 3:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-02 18:35 [PATCH] ibmtr: fix tr%d in dmesg Meelis Roos
2010-10-04 3:56 ` David Miller [this message]
2010-10-04 21:12 ` Meelis Roos
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=20101003.205632.104074109.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=mroos@linux.ee \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).