Skip to content

Commit 66e3e59

Browse files
keith-packardgregkh
authored andcommitted
usb: Add driver for Altus Metrum ChaosKey device (v2)
This is a hardware random number generator. The driver provides both a /dev/chaoskeyX entry and hooks the entropy source up to the kernel hwrng interface. More information about the device can be found at http://chaoskey.org The USB ID for ChaosKey was allocated from the OpenMoko USB vendor space and is visible as 'USBtrng' here: http://wiki.openmoko.org/wiki/USB_Product_IDs v2: Respond to review from Oliver Neukum <oneukum@suse.de> * Delete extensive debug infrastructure and replace it with calls to dev_dbg. * Allocate I/O buffer separately from device structure to obey requirements for non-coherant architectures. * Initialize mutexes before registering device to ensure that open cannot be invoked before the device is ready to proceed. * Return number of bytes read instead of -EINTR when partial read operation is aborted due to a signal. * Make sure device mutex is unlocked in read error paths. * Add MAINTAINERS entry for the driver Signed-off-by: Keith Packard <keithp@keithp.com> Cc: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 1fcefbd commit 66e3e59

File tree

4 files changed

+549
-0
lines changed

4 files changed

+549
-0
lines changed

MAINTAINERS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10129,6 +10129,12 @@ S: Maintained
1012910129
F: drivers/net/usb/cdc_*.c
1013010130
F: include/uapi/linux/usb/cdc.h
1013110131

10132+
USB CHAOSKEY DRIVER
10133+
M: Keith Packard <keithp@keithp.com>
10134+
L: linux-usb@vger.kernel.org
10135+
S: Maintained
10136+
F: drivers/usb/misc/chaoskey.c
10137+
1013210138
USB CYPRESS C67X00 DRIVER
1013310139
M: Peter Korsgaard <jacmet@sunsite.dk>
1013410140
L: linux-usb@vger.kernel.org

drivers/usb/misc/Kconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,3 +255,15 @@ config USB_LINK_LAYER_TEST
255255
This driver is for generating specific traffic for Super Speed Link
256256
Layer Test Device. Say Y only when you want to conduct USB Super Speed
257257
Link Layer Test for host controllers.
258+
259+
config USB_CHAOSKEY
260+
tristate "ChaosKey random number generator driver support"
261+
help
262+
Say Y here if you want to connect an AltusMetrum ChaosKey to
263+
your computer's USB port. The ChaosKey is a hardware random
264+
number generator which hooks into the kernel entropy pool to
265+
ensure a large supply of entropy for /dev/random and
266+
/dev/urandom and also provides direct access via /dev/chaoskeyX
267+
268+
To compile this driver as a module, choose M here: the
269+
module will be called chaoskey.

drivers/usb/misc/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ obj-$(CONFIG_USB_USS720) += uss720.o
2525
obj-$(CONFIG_USB_SEVSEG) += usbsevseg.o
2626
obj-$(CONFIG_USB_YUREX) += yurex.o
2727
obj-$(CONFIG_USB_HSIC_USB3503) += usb3503.o
28+
obj-$(CONFIG_USB_CHAOSKEY) += chaoskey.o
2829

2930
obj-$(CONFIG_USB_SISUSBVGA) += sisusbvga/
3031
obj-$(CONFIG_USB_LINK_LAYER_TEST) += lvstest.o

0 commit comments

Comments
 (0)