netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cesar Eduardo Barros <cesarb@cesarb.net>
To: jgarzik@pobox.com
Cc: netdev@vger.kernel.org, Cesar Eduardo Barros <cesarb@cesarb.net>
Subject: [PATCH 1/5] sc92031: more useful banner in kernel log
Date: Mon, 12 Jan 2009 21:21:47 -0200	[thread overview]
Message-ID: <1231802511-14825-1-git-send-email-cesarb@cesarb.net> (raw)
In-Reply-To: <496BD04F.2050502@cesarb.net>

The banner currently printed when loading the module is mostly useless.

Replace it with a more informative one, printed after probing the device.

Output format copied from 8139cp/8139too.

Signed-off-by: Cesar Eduardo Barros <cesarb@cesarb.net>
---
 drivers/net/sc92031.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/drivers/net/sc92031.c b/drivers/net/sc92031.c
index 42fd312..40b39af 100644
--- a/drivers/net/sc92031.c
+++ b/drivers/net/sc92031.c
@@ -1422,6 +1422,7 @@ static int __devinit sc92031_probe(struct pci_dev *pdev,
 	struct net_device *dev;
 	struct sc92031_priv *priv;
 	u32 mac0, mac1;
+	unsigned long base_addr;
 
 	err = pci_enable_device(pdev);
 	if (unlikely(err < 0))
@@ -1496,6 +1497,14 @@ static int __devinit sc92031_probe(struct pci_dev *pdev,
 	if (err < 0)
 		goto out_register_netdev;
 
+#if SC92031_USE_BAR == 0
+	base_addr = dev->mem_start;
+#elif SC92031_USE_BAR == 1
+	base_addr = dev->base_addr;
+#endif
+	printk(KERN_INFO "%s: SC92031 at 0x%lx, %pM, IRQ %d\n", dev->name,
+			base_addr, dev->dev_addr, dev->irq);
+
 	return 0;
 
 out_register_netdev:
@@ -1602,7 +1611,6 @@ static struct pci_driver sc92031_pci_driver = {
 
 static int __init sc92031_init(void)
 {
-	printk(KERN_INFO SC92031_DESCRIPTION " " SC92031_VERSION "\n");
 	return pci_register_driver(&sc92031_pci_driver);
 }
 
-- 
1.6.1.dirty


  reply	other threads:[~2009-01-12 23:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-12 23:20 [PATCH 0/5] sc92031: trivial cosmetic fixes Cesar Eduardo Barros
2009-01-12 23:21 ` Cesar Eduardo Barros [this message]
2009-01-12 23:21 ` [PATCH 2/5] sc92031: remove meaningless version string Cesar Eduardo Barros
2009-01-12 23:21 ` [PATCH 3/5] sc92031: inline SC92031_DESCRIPTION Cesar Eduardo Barros
2009-01-12 23:21 ` [PATCH 4/5] sc92031: use device id directly instead of made-up name Cesar Eduardo Barros
2009-01-12 23:21 ` [PATCH 5/5] sc92031: add a link to the datasheet Cesar Eduardo Barros
2009-01-15  4:34 ` [PATCH 0/5] sc92031: trivial cosmetic fixes David Miller

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=1231802511-14825-1-git-send-email-cesarb@cesarb.net \
    --to=cesarb@cesarb.net \
    --cc=jgarzik@pobox.com \
    --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).