48 lines
1.4 KiB
Diff
48 lines
1.4 KiB
Diff
|
From: Jiri Benc <jbenc@suse.cz>
|
||
|
Subject: Enable e1000 as entropy source (disabled by default)
|
||
|
References: FATE#307517
|
||
|
Patch-mainline: never
|
||
|
|
||
|
Based on the patch by Oracle:
|
||
|
|
||
|
> e1000: Add IRQF_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 IRQF_SAMPLE_RANDOM flag on request_irq calls to populate
|
||
|
> the /dev/random pool
|
||
|
>
|
||
|
> Signed-off-by: John Sobecki <john.sobecki@oracle.com>
|
||
|
|
||
|
Signed-off-by: Brandon Philips <bphilips@suse.de>
|
||
|
|
||
|
---
|
||
|
drivers/net/e1000/e1000_main.c | 7 +++++++
|
||
|
1 file changed, 7 insertions(+)
|
||
|
|
||
|
--- a/drivers/net/e1000/e1000_main.c
|
||
|
+++ b/drivers/net/e1000/e1000_main.c
|
||
|
@@ -213,6 +213,10 @@ static int debug = NETIF_MSG_DRV | NETIF
|
||
|
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
|
||
|
*
|
||
|
@@ -262,6 +266,9 @@ static int e1000_request_irq(struct e100
|
||
|
int irq_flags = IRQF_SHARED;
|
||
|
int err;
|
||
|
|
||
|
+ if (entropy)
|
||
|
+ irq_flags |= IRQF_SAMPLE_RANDOM;
|
||
|
+
|
||
|
err = request_irq(adapter->pdev->irq, handler, irq_flags, netdev->name,
|
||
|
netdev);
|
||
|
if (err) {
|