mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Nelson <james4765@cwazy.co.uk>
To: linux-kernel@vger.kernel.org
Cc: akpm@osdl.org, jgarzik@redhat.com, James Nelson <james4765@cwazy.co.uk>
Subject: [PATCH] hw_random: provide more information when driver loads
Date: Thu, 3 Feb 2005 15:29:39 -0600	[thread overview]
Message-ID: <20050203212938.4546.3768.35836@localhost.localdomain> (raw)

This patch makes the hw_random driver a little more informative when it is starting up -
currently, there is no easy way to tell if the driver detected any hardware.

The AMD driver does mention that it found the chip - this adds the same for the VIA
and Intel sections of the driver.

Tested with an i810-equipped system.

Signed-off-by: James Nelson <james4765@gmail.com>

diff -urpN -X /home/jim/kernel_sources/dontdiff-osdl linux-2.6.11-rc2-mm2-original/drivers/char/hw_random.c linux-2.6.11-rc2-mm2/drivers/char/hw_random.c
--- linux-2.6.11-rc2-mm2-original/drivers/char/hw_random.c	2005-01-29 19:02:41.000000000 -0500
+++ linux-2.6.11-rc2-mm2/drivers/char/hw_random.c	2005-02-02 19:53:50.000000000 -0500
@@ -248,6 +249,7 @@ static int __init intel_init (struct pci
 		goto err_out_free_map;
 	}
 
+	pr_info (PFX "Intel i810 RNG enabled\n");
 	DPRINTK ("EXIT, returning 0\n");
 	return 0;
 
@@ -451,6 +453,8 @@ static int __init via_init(struct pci_de
 		return -ENODEV;
 	}
 
+	pr_info(PFX "VIA C3 RNG enabled\n");
+
 	return 0;
 }
 
@@ -577,6 +581,8 @@ static int __init rng_init (void)
 
 	DPRINTK ("ENTER\n");
 
+	pr_info( RNG_DRIVER_NAME "\n");
+
 	/* Probe for Intel, AMD RNGs */
 	for_each_pci_dev(pdev) {
 		ent = pci_match_device (rng_pci_tbl, pdev);
@@ -595,6 +601,7 @@ static int __init rng_init (void)
 	}
 #endif
 
+	printk (KERN_ERR PFX "no supported hardware RNGs found\n");
 	DPRINTK ("EXIT, returning -ENODEV\n");
 	return -ENODEV;
 
@@ -603,8 +610,6 @@ match:
 	if (rc)
 		return rc;
 
-	pr_info( RNG_DRIVER_NAME " loaded\n");
-
 	DPRINTK ("EXIT, returning 0\n");
 	return 0;
 }

                 reply	other threads:[~2005-02-03 21:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20050203212938.4546.3768.35836@localhost.localdomain \
    --to=james4765@cwazy.co.uk \
    --cc=akpm@osdl.org \
    --cc=jgarzik@redhat.com \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®