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-08-20 23:20:31.000000000 -0700
+++ linux-2.6.18.x86_64/drivers/net/e1000/e1000_main.c	2007-08-20 23:26:53.000000000 -0700
@@ -36,7 +36,7 @@
 #else
 #define DRIVERNAPI "-NAPI"
 #endif
-#define DRV_VERSION "7.3.20-k2"DRIVERNAPI
+#define DRV_VERSION "7.3.20-k2ora"DRIVERNAPI
 char e1000_driver_version[] = DRV_VERSION;
 static char e1000_copyright[] = "Copyright (c) 1999-2006 Intel Corporation.";
 
@@ -252,6 +252,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
  *
@@ -300,8 +304,12 @@
 {
 	struct net_device *netdev = adapter->netdev;
 	void (*handler) = &e1000_intr;
-	int irq_flags = IRQF_SHARED;
-	int err;
+	int irq_flags, err;
+
+	if (entropy)
+		irq_flags = IRQF_SHARED|SA_SAMPLE_RANDOM;
+	else 
+		irq_flags = IRQF_SHARED;
 
 	if (adapter->hw.mac_type >= e1000_82571) {
 		adapter->have_msi = !pci_enable_msi(adapter->pdev);
