<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/usb/misc/chaoskey.c, branch v4.1</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>usb: Fix warnings in chaoskey driver</title>
<updated>2015-04-01T12:00:11+00:00</updated>
<author>
<name>Keith Packard</name>
<email>keithp@keithp.com</email>
</author>
<published>2015-03-26T23:49:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8b86ed078a65433a60ff59091a136d23724bd6d3'/>
<id>8b86ed078a65433a60ff59091a136d23724bd6d3</id>
<content type='text'>
&gt;    drivers/usb/misc/chaoskey.c: In function 'chaoskey_read':
&gt; &gt;&gt; drivers/usb/misc/chaoskey.c:412:3: error: implicit declaration of function 'copy_to_user'
&gt; &gt;&gt; [-Werror=implicit-function-declaration]
&gt;       remain = copy_to_user(buffer, dev-&gt;buf + dev-&gt;used, this_time);

I was unable to reproduce this locally, but added an explicit

	#include &lt;linux/uaccess.h&gt;

which should ensure the definition on all architectures.

&gt; sparse warnings: (new ones prefixed by &gt;&gt;)
&gt;
&gt; &gt;&gt; drivers/usb/misc/chaoskey.c:117:30: sparse: incorrect type in assignment (different base types)
&gt;    drivers/usb/misc/chaoskey.c:117:30:    expected int [signed] size
&gt;    drivers/usb/misc/chaoskey.c:117:30:    got restricted __le16 [usertype] wMaxPacketSize

Switched the code to using the USB descriptor accessor functions.

Signed-off-by: Keith Packard &lt;keithp@keithp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
&gt;    drivers/usb/misc/chaoskey.c: In function 'chaoskey_read':
&gt; &gt;&gt; drivers/usb/misc/chaoskey.c:412:3: error: implicit declaration of function 'copy_to_user'
&gt; &gt;&gt; [-Werror=implicit-function-declaration]
&gt;       remain = copy_to_user(buffer, dev-&gt;buf + dev-&gt;used, this_time);

I was unable to reproduce this locally, but added an explicit

	#include &lt;linux/uaccess.h&gt;

which should ensure the definition on all architectures.

&gt; sparse warnings: (new ones prefixed by &gt;&gt;)
&gt;
&gt; &gt;&gt; drivers/usb/misc/chaoskey.c:117:30: sparse: incorrect type in assignment (different base types)
&gt;    drivers/usb/misc/chaoskey.c:117:30:    expected int [signed] size
&gt;    drivers/usb/misc/chaoskey.c:117:30:    got restricted __le16 [usertype] wMaxPacketSize

Switched the code to using the USB descriptor accessor functions.

Signed-off-by: Keith Packard &lt;keithp@keithp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: Add driver for Altus Metrum ChaosKey device (v2)</title>
<updated>2015-03-26T09:47:11+00:00</updated>
<author>
<name>Keith Packard</name>
<email>keithp@keithp.com</email>
</author>
<published>2015-03-20T03:36:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=66e3e591891da9899a8990792da080432531ffd4'/>
<id>66e3e591891da9899a8990792da080432531ffd4</id>
<content type='text'>
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 &lt;oneukum@suse.de&gt;

 * 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 &lt;keithp@keithp.com&gt;
Cc: Oliver Neukum &lt;oneukum@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;oneukum@suse.de&gt;

 * 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 &lt;keithp@keithp.com&gt;
Cc: Oliver Neukum &lt;oneukum@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
