aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-07-26 02:08:32 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-07-26 02:08:32 -0400
commitf549953c15deab4c54708b39af86d4edecc6cddc (patch)
treef0412f989b77cdceab34c18aa85a8a25d5942a1f /drivers/usb/core
parentf0deb97ab13ad1f89cd0993f7339655d59788405 (diff)
parente04f5f7e423018bcec84c11af2058cdce87816f3 (diff)
Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (115 commits) EHCI: fix direction handling for interrupt data toggles USB: serial: add IDs for WinChipHead USB->RS232 adapter USB: OHCI: fix another regression for NVIDIA controllers usb: gadget: m66592-udc: add pullup function usb: gadget: m66592-udc: add function for external controller usb: gadget: r8a66597-udc: add pullup function usb: renesas_usbhs: support multi driver usb: renesas_usbhs: inaccessible pipe is not an error usb: renesas_usbhs: care buff alignment when dma handler USB: PL2303: correctly handle baudrates above 115200 usb: r8a66597-hcd: fixup USB_PORT_STAT_C_SUSPEND shift usb: renesas_usbhs: compile/config are rescued usb: renesas_usbhs: fixup comment-out usb: update email address in ohci-sh and r8a66597-hcd usb: r8a66597-hcd: add function for external controller EHCI: only power off port if over-current is active USB: mon: Allow to use usbmon without debugfs USB: EHCI: go back to using the system clock for QH unlinks ehci: add pci quirk for Ordissimo and RM Slate 100 too ehci: refactor pci quirk to use standard dmi_check_system method ... Fix up trivial conflicts in Documentation/feature-removal-schedule.txt
Diffstat (limited to 'drivers/usb/core')
-rw-r--r--drivers/usb/core/hcd.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index ace9f8442e5..8669ba3fe79 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -337,6 +337,17 @@ static const u8 ss_rh_config_descriptor[] = {
337 0x02, 0x00 /* __le16 ss_wBytesPerInterval; 15 bits for max 15 ports */ 337 0x02, 0x00 /* __le16 ss_wBytesPerInterval; 15 bits for max 15 ports */
338}; 338};
339 339
340/* authorized_default behaviour:
341 * -1 is authorized for all devices except wireless (old behaviour)
342 * 0 is unauthorized for all devices
343 * 1 is authorized for all devices
344 */
345static int authorized_default = -1;
346module_param(authorized_default, int, S_IRUGO|S_IWUSR);
347MODULE_PARM_DESC(authorized_default,
348 "Default USB device authorization: 0 is not authorized, 1 is "
349 "authorized, -1 is authorized except for wireless USB (default, "
350 "old behaviour");
340/*-------------------------------------------------------------------------*/ 351/*-------------------------------------------------------------------------*/
341 352
342/** 353/**
@@ -2371,7 +2382,11 @@ int usb_add_hcd(struct usb_hcd *hcd,
2371 2382
2372 dev_info(hcd->self.controller, "%s\n", hcd->product_desc); 2383 dev_info(hcd->self.controller, "%s\n", hcd->product_desc);
2373 2384
2374 hcd->authorized_default = hcd->wireless? 0 : 1; 2385 /* Keep old behaviour if authorized_default is not in [0, 1]. */
2386 if (authorized_default < 0 || authorized_default > 1)
2387 hcd->authorized_default = hcd->wireless? 0 : 1;
2388 else
2389 hcd->authorized_default = authorized_default;
2375 set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); 2390 set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
2376 2391
2377 /* HC is in reset state, but accessible. Now do the one-time init, 2392 /* HC is in reset state, but accessible. Now do the one-time init,