From patchwork Fri Jun 3 11:13:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Ham X-Patchwork-Id: 9152885 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6C6E66072B for ; Fri, 3 Jun 2016 11:13:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5E63A27BFA for ; Fri, 3 Jun 2016 11:13:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 53065282EE; Fri, 3 Jun 2016 11:13:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B9A6427BFA for ; Fri, 3 Jun 2016 11:13:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932689AbcFCLNb (ORCPT ); Fri, 3 Jun 2016 07:13:31 -0400 Received: from verain.settrans.net ([93.93.131.233]:35528 "EHLO verain.settrans.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932232AbcFCLNa (ORCPT ); Fri, 3 Jun 2016 07:13:30 -0400 Received: from host-92-27-146-102.static.as13285.net ([92.27.146.102] helo=myrtle.h.settrans.net) by verain.settrans.net with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1b8n2a-0008Al-0k; Fri, 03 Jun 2016 12:13:24 +0100 Received: from [2001:470:c9a2:1::85d] (helo=aloe) by myrtle.h.settrans.net with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1b8n2Z-0002M1-Ch; Fri, 03 Jun 2016 12:13:23 +0100 Received: from rah by aloe with local (Exim 4.84_2) (envelope-from ) id 1b8n2K-0000dT-C9; Fri, 03 Jun 2016 12:13:08 +0100 From: Bob Ham To: linux-crypto@vger.kernel.org, linux-usb@vger.kernel.org, Keith Packard Cc: Matt Mackall , Herbert Xu , Clemens Ladisch , Greg KH Subject: [PATCH 1/2] hwrng: chaoskey - Add support for Araneus Alea I USB RNG Date: Fri, 3 Jun 2016 12:13:07 +0100 Message-Id: <1464952388-2405-2-git-send-email-bob.ham@collabora.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1464952388-2405-1-git-send-email-bob.ham@collabora.com> References: <1464952388-2405-1-git-send-email-bob.ham@collabora.com> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Adds support for the Araneus Alea I USB hardware Random Number Generator which is interfaced with in exactly the same way as the Altus Metrum ChaosKey. We just add the appropriate device ID and modify the config help text. Signed-off-by: Bob Ham --- drivers/usb/misc/Kconfig | 11 ++++++----- drivers/usb/misc/chaoskey.c | 4 ++++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/usb/misc/Kconfig b/drivers/usb/misc/Kconfig index e9e5ae5..6e70597 100644 --- a/drivers/usb/misc/Kconfig +++ b/drivers/usb/misc/Kconfig @@ -260,11 +260,12 @@ config USB_CHAOSKEY tristate "ChaosKey random number generator driver support" depends on HW_RANDOM help - Say Y here if you want to connect an AltusMetrum ChaosKey to - your computer's USB port. The ChaosKey is a hardware random - number generator which hooks into the kernel entropy pool to - ensure a large supply of entropy for /dev/random and - /dev/urandom and also provides direct access via /dev/chaoskeyX + Say Y here if you want to connect an AltusMetrum ChaosKey or + Araneus Alea I to your computer's USB port. These devices + are hardware random number generators which hook into the + kernel entropy pool to ensure a large supply of entropy for + /dev/random and /dev/urandom and also provides direct access + via /dev/chaoskeyX To compile this driver as a module, choose M here: the module will be called chaoskey. diff --git a/drivers/usb/misc/chaoskey.c b/drivers/usb/misc/chaoskey.c index 76350e4..9aef46b 100644 --- a/drivers/usb/misc/chaoskey.c +++ b/drivers/usb/misc/chaoskey.c @@ -55,6 +55,9 @@ MODULE_LICENSE("GPL"); #define CHAOSKEY_VENDOR_ID 0x1d50 /* OpenMoko */ #define CHAOSKEY_PRODUCT_ID 0x60c6 /* ChaosKey */ +#define ALEA_VENDOR_ID 0x12d8 /* Araneus */ +#define ALEA_PRODUCT_ID 0x0001 /* Alea I */ + #define CHAOSKEY_BUF_LEN 64 /* max size of USB full speed packet */ #define NAK_TIMEOUT (HZ) /* stall/wait timeout for device */ @@ -69,6 +72,7 @@ MODULE_LICENSE("GPL"); static const struct usb_device_id chaoskey_table[] = { { USB_DEVICE(CHAOSKEY_VENDOR_ID, CHAOSKEY_PRODUCT_ID) }, + { USB_DEVICE(ALEA_VENDOR_ID, ALEA_PRODUCT_ID) }, { }, }; MODULE_DEVICE_TABLE(usb, chaoskey_table);