linux/drivers/char/hw_random
Peter Korsgaard c475c06f4b hwrng: atmel-rng - fix data valid check
Brown paper bag: Data valid is LSB of the ISR (status register), and NOT
of ODATA (current random data word)!

With this, rngtest is a lot happier. Before:

rngtest 3
Copyright (c) 2004 by Henrique de Moraes Holschuh
This is free software; see the source for copying conditions.  There is NO warr.

rngtest: starting FIPS tests...
rngtest: bits received from input: 20000032
rngtest: FIPS 140-2 successes: 3
rngtest: FIPS 140-2 failures: 997
rngtest: FIPS 140-2(2001-10-10) Monobit: 604
rngtest: FIPS 140-2(2001-10-10) Poker: 996
rngtest: FIPS 140-2(2001-10-10) Runs: 36
rngtest: FIPS 140-2(2001-10-10) Long run: 0
rngtest: FIPS 140-2(2001-10-10) Continuous run: 117
rngtest: input channel speed: (min=622.371; avg=23682.481; max=28224.350)Kibitss
rngtest: FIPS tests speed: (min=12.361; avg=12.718; max=12.861)Mibits/s
rngtest: Program run time: 2331696 microsecondsx

After:
rngtest 3
Copyright (c) 2004 by Henrique de Moraes Holschuh
This is free software; see the source for copying conditions.  There is NO warr.

rngtest: starting FIPS tests...
rngtest: bits received from input: 20000032
rngtest: FIPS 140-2 successes: 999
rngtest: FIPS 140-2 failures: 1
rngtest: FIPS 140-2(2001-10-10) Monobit: 0
rngtest: FIPS 140-2(2001-10-10) Poker: 0
rngtest: FIPS 140-2(2001-10-10) Runs: 1
rngtest: FIPS 140-2(2001-10-10) Long run: 0
rngtest: FIPS 140-2(2001-10-10) Continuous run: 0
rngtest: input channel speed: (min=777.363; avg=43588.270; max=47870.711)Kibitss
rngtest: FIPS tests speed: (min=11.943; avg=12.716; max=12.844)Mibits/s
rngtest: Program run time: 1955282 microseconds

Cc: stable@vger.kernel.org
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Reported-by: George Pontis <GPontis@z9.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2012-06-12 08:27:04 +08:00
..
amd-rng.c hwrng: amd - manage resource allocation 2011-05-04 15:13:15 +10:00
atmel-rng.c hwrng: atmel-rng - fix data valid check 2012-06-12 08:27:04 +08:00
core.c Update my e-mail address 2011-07-07 15:18:01 +02:00
geode-rng.c hwrng: Use PCI_VDEVICE 2009-06-25 13:50:53 +08:00
intel-rng.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ixp4xx-rng.c [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach 2008-08-07 09:55:48 +01:00
Kconfig hwrng: Kconfig - modify default state for atmel-rng driver 2012-04-30 20:00:35 +10:00
Makefile hw_random: add driver for atmel true hardware random number generator 2011-10-10 12:42:49 +02:00
mxc-rnga.c i.MX31: Add hw-random for RNGA 2009-05-07 16:17:16 +02:00
n2-asm.S sparc64: Add Niagara2 RNG driver. 2008-07-18 00:46:09 -07:00
n2-drv.c char: hw_random: convert drivers/char/hw_random/* to use module_platform_driver() 2011-11-30 16:12:47 +08:00
n2rng.h n2rng: Attach on Niagara-T3. 2011-07-28 01:26:30 -07:00
nomadik-rng.c ARM: 7362/1: AMBA: Add module_amba_driver() helper macro for amba_driver 2012-03-16 23:32:35 +00:00
octeon-rng.c char: hw_random: convert drivers/char/hw_random/* to use module_platform_driver() 2011-11-30 16:12:47 +08:00
omap-rng.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux 2012-05-15 17:21:26 +10:00
pasemi-rng.c char: hw_random: convert drivers/char/hw_random/* to use module_platform_driver() 2011-11-30 16:12:47 +08:00
picoxcell-rng.c char: hw_random: convert drivers/char/hw_random/* to use module_platform_driver() 2011-11-30 16:12:47 +08:00
ppc4xx-rng.c char: hw_random: convert drivers/char/hw_random/* to use module_platform_driver() 2011-11-30 16:12:47 +08:00
timeriomem-rng.c char: hw_random: convert drivers/char/hw_random/* to use module_platform_driver() 2011-11-30 16:12:47 +08:00
tx4939-rng.c hwrng: tx4939 - use devm_request_and_ioremap 2012-01-13 16:38:40 +11:00
via-rng.c hwrng: via_rng - Fix memory scribbling on some CPUs 2011-01-07 14:55:06 +11:00
virtio-rng.c virtio: rename virtqueue_add_buf_gfp to virtqueue_add_buf 2012-01-12 15:44:42 +10:30