diff options
Diffstat (limited to 'drivers/s390/crypto/zcrypt_api.c')
-rw-r--r-- | drivers/s390/crypto/zcrypt_api.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/s390/crypto/zcrypt_api.c b/drivers/s390/crypto/zcrypt_api.c index 08f1830cbfc4..01bf1f5cf2e9 100644 --- a/drivers/s390/crypto/zcrypt_api.c +++ b/drivers/s390/crypto/zcrypt_api.c | |||
@@ -54,6 +54,10 @@ MODULE_DESCRIPTION("Cryptographic Coprocessor interface, " \ | |||
54 | "Copyright IBM Corp. 2001, 2012"); | 54 | "Copyright IBM Corp. 2001, 2012"); |
55 | MODULE_LICENSE("GPL"); | 55 | MODULE_LICENSE("GPL"); |
56 | 56 | ||
57 | static int zcrypt_hwrng_seed = 1; | ||
58 | module_param_named(hwrng_seed, zcrypt_hwrng_seed, int, S_IRUSR|S_IRGRP); | ||
59 | MODULE_PARM_DESC(hwrng_seed, "Turn on/off hwrng auto seed, default is 1 (on)."); | ||
60 | |||
57 | static DEFINE_SPINLOCK(zcrypt_device_lock); | 61 | static DEFINE_SPINLOCK(zcrypt_device_lock); |
58 | static LIST_HEAD(zcrypt_device_list); | 62 | static LIST_HEAD(zcrypt_device_list); |
59 | static int zcrypt_device_count = 0; | 63 | static int zcrypt_device_count = 0; |
@@ -1373,6 +1377,7 @@ static int zcrypt_rng_data_read(struct hwrng *rng, u32 *data) | |||
1373 | static struct hwrng zcrypt_rng_dev = { | 1377 | static struct hwrng zcrypt_rng_dev = { |
1374 | .name = "zcrypt", | 1378 | .name = "zcrypt", |
1375 | .data_read = zcrypt_rng_data_read, | 1379 | .data_read = zcrypt_rng_data_read, |
1380 | .quality = 990, | ||
1376 | }; | 1381 | }; |
1377 | 1382 | ||
1378 | static int zcrypt_rng_device_add(void) | 1383 | static int zcrypt_rng_device_add(void) |
@@ -1387,6 +1392,8 @@ static int zcrypt_rng_device_add(void) | |||
1387 | goto out; | 1392 | goto out; |
1388 | } | 1393 | } |
1389 | zcrypt_rng_buffer_index = 0; | 1394 | zcrypt_rng_buffer_index = 0; |
1395 | if (!zcrypt_hwrng_seed) | ||
1396 | zcrypt_rng_dev.quality = 0; | ||
1390 | rc = hwrng_register(&zcrypt_rng_dev); | 1397 | rc = hwrng_register(&zcrypt_rng_dev); |
1391 | if (rc) | 1398 | if (rc) |
1392 | goto out_free; | 1399 | goto out_free; |