e1000: Add SA_SAMPLE_RANDOM flag to e1000 as a module option

This patch allows for the bnx2 to add to the /dev/random entropy pool
via a module parameter, entropy.

0 - default for EL5 - do not populate the entropy pool
1 - optional  - Uses SA_SAMPLE_RANDOM flag on request_irq calls to populate
                the /dev/random pool

Signed-off-by: John Sobecki <john.sobecki@oracle.com>

--- linux-2.6.18.x86_64/drivers/net/e1000/e1000_main.c.orig	2007-05-15 12:07:26.948718000 -0700
+++ linux-2.6.18.x86_64/drivers/net/e1000/e1000_main.c	2007-05-15 12:16:54.364251000 -0700
@@ -36,7 +36,7 @@
 #else
 #define DRIVERNAPI "-NAPI"
 #endif
-#define DRV_VERSION "7.2.7-k2"DRIVERNAPI
+#define DRV_VERSION "7.2.7-k2ora"DRIVERNAPI
 char e1000_driver_version[] = DRV_VERSION;
 static char e1000_copyright[] = "Copyright (c) 1999-2006 Intel Corporation.";
 
@@ -233,6 +233,10 @@
 module_param(debug, int, 0);
 MODULE_PARM_DESC(debug, "Debug level (0=none,...,16=all)");
 
+static int entropy = 0;
+module_param(entropy, int, 0);
+MODULE_PARM_DESC(entropy, "Allow e1000 to populate the /dev/random entropy pool");
+
 /**
  * e1000_init_module - Driver Registration Routine
  *
@@ -276,7 +280,11 @@
 	struct net_device *netdev = adapter->netdev;
 	int flags, err = 0;
 
-	flags = IRQF_SHARED;
+	if (entropy)
+	  flags = IRQF_SHARED|SA_SAMPLE_RANDOM;
+	else
+	  flags = IRQF_SHARED;
+
 #ifdef CONFIG_PCI_MSI
 	if (adapter->hw.mac_type > e1000_82547_rev_2) {
 		adapter->have_msi = TRUE;
