aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-07-31 22:07:42 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-31 22:07:42 -0400
commit3e9a97082fa639394e905e1fc4a0a7f719ca7644 (patch)
tree9985cfa26e0597128eae03a2ee7e4614efea571f /drivers/usb
parent941c8726e4e737e74d418ccec3d8e7b946a65541 (diff)
parentd2e7c96af1e54b507ae2a6a7dd2baf588417a7e5 (diff)
Merge tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random
Pull random subsystem patches from Ted Ts'o: "This patch series contains a major revamp of how we collect entropy from interrupts for /dev/random and /dev/urandom. The goal is to addresses weaknesses discussed in the paper "Mining your Ps and Qs: Detection of Widespread Weak Keys in Network Devices", by Nadia Heninger, Zakir Durumeric, Eric Wustrow, J. Alex Halderman, which will be published in the Proceedings of the 21st Usenix Security Symposium, August 2012. (See https://factorable.net for more information and an extended version of the paper.)" Fix up trivial conflicts due to nearby changes in drivers/{mfd/ab3100-core.c, usb/gadget/omap_udc.c} * tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random: (33 commits) random: mix in architectural randomness in extract_buf() dmi: Feed DMI table to /dev/random driver random: Add comment to random_initialize() random: final removal of IRQF_SAMPLE_RANDOM um: remove IRQF_SAMPLE_RANDOM which is now a no-op sparc/ldc: remove IRQF_SAMPLE_RANDOM which is now a no-op [ARM] pxa: remove IRQF_SAMPLE_RANDOM which is now a no-op board-palmz71: remove IRQF_SAMPLE_RANDOM which is now a no-op isp1301_omap: remove IRQF_SAMPLE_RANDOM which is now a no-op pxa25x_udc: remove IRQF_SAMPLE_RANDOM which is now a no-op omap_udc: remove IRQF_SAMPLE_RANDOM which is now a no-op goku_udc: remove IRQF_SAMPLE_RANDOM which was commented out uartlite: remove IRQF_SAMPLE_RANDOM which is now a no-op drivers: hv: remove IRQF_SAMPLE_RANDOM which is now a no-op xen-blkfront: remove IRQF_SAMPLE_RANDOM which is now a no-op n2_crypto: remove IRQF_SAMPLE_RANDOM which is now a no-op pda_power: remove IRQF_SAMPLE_RANDOM which is now a no-op i2c-pmcmsp: remove IRQF_SAMPLE_RANDOM which is now a no-op input/serio/hp_sdc.c: remove IRQF_SAMPLE_RANDOM which is now a no-op mfd: remove IRQF_SAMPLE_RANDOM which is now a no-op ...
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/core/hub.c9
-rw-r--r--drivers/usb/gadget/goku_udc.c2
-rw-r--r--drivers/usb/gadget/pxa25x_udc.c12
-rw-r--r--drivers/usb/otg/isp1301_omap.c1
4 files changed, 14 insertions, 10 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 821126eb8176..128a804c42f4 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -25,6 +25,7 @@
25#include <linux/kthread.h> 25#include <linux/kthread.h>
26#include <linux/mutex.h> 26#include <linux/mutex.h>
27#include <linux/freezer.h> 27#include <linux/freezer.h>
28#include <linux/random.h>
28 29
29#include <asm/uaccess.h> 30#include <asm/uaccess.h>
30#include <asm/byteorder.h> 31#include <asm/byteorder.h>
@@ -2181,6 +2182,14 @@ int usb_new_device(struct usb_device *udev)
2181 /* Tell the world! */ 2182 /* Tell the world! */
2182 announce_device(udev); 2183 announce_device(udev);
2183 2184
2185 if (udev->serial)
2186 add_device_randomness(udev->serial, strlen(udev->serial));
2187 if (udev->product)
2188 add_device_randomness(udev->product, strlen(udev->product));
2189 if (udev->manufacturer)
2190 add_device_randomness(udev->manufacturer,
2191 strlen(udev->manufacturer));
2192
2184 device_enable_async_suspend(&udev->dev); 2193 device_enable_async_suspend(&udev->dev);
2185 2194
2186 /* 2195 /*
diff --git a/drivers/usb/gadget/goku_udc.c b/drivers/usb/gadget/goku_udc.c
index 3d28fb976c78..9fd7886cfa9a 100644
--- a/drivers/usb/gadget/goku_udc.c
+++ b/drivers/usb/gadget/goku_udc.c
@@ -1836,7 +1836,7 @@ static int goku_probe(struct pci_dev *pdev, const struct pci_device_id *id)
1836 /* init to known state, then setup irqs */ 1836 /* init to known state, then setup irqs */
1837 udc_reset(dev); 1837 udc_reset(dev);
1838 udc_reinit (dev); 1838 udc_reinit (dev);
1839 if (request_irq(pdev->irq, goku_irq, IRQF_SHARED/*|IRQF_SAMPLE_RANDOM*/, 1839 if (request_irq(pdev->irq, goku_irq, IRQF_SHARED,
1840 driver_name, dev) != 0) { 1840 driver_name, dev) != 0) {
1841 DBG(dev, "request interrupt %d failed\n", pdev->irq); 1841 DBG(dev, "request interrupt %d failed\n", pdev->irq);
1842 retval = -EBUSY; 1842 retval = -EBUSY;
diff --git a/drivers/usb/gadget/pxa25x_udc.c b/drivers/usb/gadget/pxa25x_udc.c
index 53c093b941e5..907ad3ecb341 100644
--- a/drivers/usb/gadget/pxa25x_udc.c
+++ b/drivers/usb/gadget/pxa25x_udc.c
@@ -2201,19 +2201,15 @@ static int __init pxa25x_udc_probe(struct platform_device *pdev)
2201 2201
2202#ifdef CONFIG_ARCH_LUBBOCK 2202#ifdef CONFIG_ARCH_LUBBOCK
2203 if (machine_is_lubbock()) { 2203 if (machine_is_lubbock()) {
2204 retval = request_irq(LUBBOCK_USB_DISC_IRQ, 2204 retval = request_irq(LUBBOCK_USB_DISC_IRQ, lubbock_vbus_irq,
2205 lubbock_vbus_irq, 2205 0, driver_name, dev);
2206 IRQF_SAMPLE_RANDOM,
2207 driver_name, dev);
2208 if (retval != 0) { 2206 if (retval != 0) {
2209 pr_err("%s: can't get irq %i, err %d\n", 2207 pr_err("%s: can't get irq %i, err %d\n",
2210 driver_name, LUBBOCK_USB_DISC_IRQ, retval); 2208 driver_name, LUBBOCK_USB_DISC_IRQ, retval);
2211 goto err_irq_lub; 2209 goto err_irq_lub;
2212 } 2210 }
2213 retval = request_irq(LUBBOCK_USB_IRQ, 2211 retval = request_irq(LUBBOCK_USB_IRQ, lubbock_vbus_irq,
2214 lubbock_vbus_irq, 2212 0, driver_name, dev);
2215 IRQF_SAMPLE_RANDOM,
2216 driver_name, dev);
2217 if (retval != 0) { 2213 if (retval != 0) {
2218 pr_err("%s: can't get irq %i, err %d\n", 2214 pr_err("%s: can't get irq %i, err %d\n",
2219 driver_name, LUBBOCK_USB_IRQ, retval); 2215 driver_name, LUBBOCK_USB_IRQ, retval);
diff --git a/drivers/usb/otg/isp1301_omap.c b/drivers/usb/otg/isp1301_omap.c
index 575fc815c932..7a88667742b6 100644
--- a/drivers/usb/otg/isp1301_omap.c
+++ b/drivers/usb/otg/isp1301_omap.c
@@ -1576,7 +1576,6 @@ isp1301_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
1576 isp->irq_type = IRQF_TRIGGER_FALLING; 1576 isp->irq_type = IRQF_TRIGGER_FALLING;
1577 } 1577 }
1578 1578
1579 isp->irq_type |= IRQF_SAMPLE_RANDOM;
1580 status = request_irq(i2c->irq, isp1301_irq, 1579 status = request_irq(i2c->irq, isp1301_irq,
1581 isp->irq_type, DRIVER_NAME, isp); 1580 isp->irq_type, DRIVER_NAME, isp);
1582 if (status < 0) { 1581 if (status < 0) {