diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-12-21 00:33:12 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-12-21 00:33:12 -0500 |
| commit | 7bddaaca472a08bb8a80b653855a1e921b440578 (patch) | |
| tree | b41b48c4ae5da770c20ba7ce00f6fa3d76b5a2a1 | |
| parent | 9d5004fcf6e4e8caa9efbc25c9f85059b165329c (diff) | |
| parent | dbb442b85a1d82f91cfe0524c4f9b3a5196a10ca (diff) | |
Merge branch 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
Revert "USB: gadget: Allow function access to device ID data during bind()"
USB: misc: uss720.c: add another vendor/product ID
USB: usb-storage: unusual_devs entry for the Samsung YP-CP3
USB: gadget: Remove suspended sysfs file before freeing cdev
USB: core: Add input prompt and help text for USB_OTG config
USB: ftdi_sio: Add D.O.Tec PID
xhci: Fix issue with port array setup and buggy hosts.
| -rw-r--r-- | drivers/usb/core/Kconfig | 12 | ||||
| -rw-r--r-- | drivers/usb/gadget/composite.c | 18 | ||||
| -rw-r--r-- | drivers/usb/host/xhci-mem.c | 25 | ||||
| -rw-r--r-- | drivers/usb/misc/uss720.c | 4 | ||||
| -rw-r--r-- | drivers/usb/serial/ftdi_sio.c | 1 | ||||
| -rw-r--r-- | drivers/usb/serial/ftdi_sio_ids.h | 5 | ||||
| -rw-r--r-- | drivers/usb/storage/unusual_devs.h | 7 |
7 files changed, 50 insertions, 22 deletions
diff --git a/drivers/usb/core/Kconfig b/drivers/usb/core/Kconfig index 9eed5b52d9de..bcc24779ba0e 100644 --- a/drivers/usb/core/Kconfig +++ b/drivers/usb/core/Kconfig | |||
| @@ -107,11 +107,19 @@ config USB_SUSPEND | |||
| 107 | If you are unsure about this, say N here. | 107 | If you are unsure about this, say N here. |
| 108 | 108 | ||
| 109 | config USB_OTG | 109 | config USB_OTG |
| 110 | bool | 110 | bool "OTG support" |
| 111 | depends on USB && EXPERIMENTAL | 111 | depends on USB && EXPERIMENTAL |
| 112 | depends on USB_SUSPEND | 112 | depends on USB_SUSPEND |
| 113 | default n | 113 | default n |
| 114 | 114 | help | |
| 115 | The most notable feature of USB OTG is support for a | ||
| 116 | "Dual-Role" device, which can act as either a device | ||
| 117 | or a host. The initial role is decided by the type of | ||
| 118 | plug inserted and can be changed later when two dual | ||
| 119 | role devices talk to each other. | ||
| 120 | |||
| 121 | Select this only if your board has Mini-AB/Micro-AB | ||
| 122 | connector. | ||
| 115 | 123 | ||
| 116 | config USB_OTG_WHITELIST | 124 | config USB_OTG_WHITELIST |
| 117 | bool "Rely on OTG Targeted Peripherals List" | 125 | bool "Rely on OTG Targeted Peripherals List" |
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index 7b5cc16e4a0b..8572dad5ecbb 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c | |||
| @@ -1047,9 +1047,9 @@ composite_unbind(struct usb_gadget *gadget) | |||
| 1047 | kfree(cdev->req->buf); | 1047 | kfree(cdev->req->buf); |
| 1048 | usb_ep_free_request(gadget->ep0, cdev->req); | 1048 | usb_ep_free_request(gadget->ep0, cdev->req); |
| 1049 | } | 1049 | } |
| 1050 | device_remove_file(&gadget->dev, &dev_attr_suspended); | ||
| 1050 | kfree(cdev); | 1051 | kfree(cdev); |
| 1051 | set_gadget_data(gadget, NULL); | 1052 | set_gadget_data(gadget, NULL); |
| 1052 | device_remove_file(&gadget->dev, &dev_attr_suspended); | ||
| 1053 | composite = NULL; | 1053 | composite = NULL; |
| 1054 | } | 1054 | } |
| 1055 | 1055 | ||
| @@ -1107,14 +1107,6 @@ static int composite_bind(struct usb_gadget *gadget) | |||
| 1107 | */ | 1107 | */ |
| 1108 | usb_ep_autoconfig_reset(cdev->gadget); | 1108 | usb_ep_autoconfig_reset(cdev->gadget); |
| 1109 | 1109 | ||
| 1110 | /* standardized runtime overrides for device ID data */ | ||
| 1111 | if (idVendor) | ||
| 1112 | cdev->desc.idVendor = cpu_to_le16(idVendor); | ||
| 1113 | if (idProduct) | ||
| 1114 | cdev->desc.idProduct = cpu_to_le16(idProduct); | ||
| 1115 | if (bcdDevice) | ||
| 1116 | cdev->desc.bcdDevice = cpu_to_le16(bcdDevice); | ||
| 1117 | |||
| 1118 | /* composite gadget needs to assign strings for whole device (like | 1110 | /* composite gadget needs to assign strings for whole device (like |
| 1119 | * serial number), register function drivers, potentially update | 1111 | * serial number), register function drivers, potentially update |
| 1120 | * power state and consumption, etc | 1112 | * power state and consumption, etc |
| @@ -1126,6 +1118,14 @@ static int composite_bind(struct usb_gadget *gadget) | |||
| 1126 | cdev->desc = *composite->dev; | 1118 | cdev->desc = *composite->dev; |
| 1127 | cdev->desc.bMaxPacketSize0 = gadget->ep0->maxpacket; | 1119 | cdev->desc.bMaxPacketSize0 = gadget->ep0->maxpacket; |
| 1128 | 1120 | ||
| 1121 | /* standardized runtime overrides for device ID data */ | ||
| 1122 | if (idVendor) | ||
| 1123 | cdev->desc.idVendor = cpu_to_le16(idVendor); | ||
| 1124 | if (idProduct) | ||
| 1125 | cdev->desc.idProduct = cpu_to_le16(idProduct); | ||
| 1126 | if (bcdDevice) | ||
| 1127 | cdev->desc.bcdDevice = cpu_to_le16(bcdDevice); | ||
| 1128 | |||
| 1129 | /* stirng overrides */ | 1129 | /* stirng overrides */ |
| 1130 | if (iManufacturer || !cdev->desc.iManufacturer) { | 1130 | if (iManufacturer || !cdev->desc.iManufacturer) { |
| 1131 | if (!iManufacturer && !composite->iManufacturer && | 1131 | if (!iManufacturer && !composite->iManufacturer && |
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index 0fae58ef8afe..1d0f45f0e7a6 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c | |||
| @@ -1680,6 +1680,7 @@ static void xhci_add_in_port(struct xhci_hcd *xhci, unsigned int num_ports, | |||
| 1680 | xhci->port_array[i] = (u8) -1; | 1680 | xhci->port_array[i] = (u8) -1; |
| 1681 | } | 1681 | } |
| 1682 | /* FIXME: Should we disable the port? */ | 1682 | /* FIXME: Should we disable the port? */ |
| 1683 | continue; | ||
| 1683 | } | 1684 | } |
| 1684 | xhci->port_array[i] = major_revision; | 1685 | xhci->port_array[i] = major_revision; |
| 1685 | if (major_revision == 0x03) | 1686 | if (major_revision == 0x03) |
| @@ -1758,16 +1759,20 @@ static int xhci_setup_port_arrays(struct xhci_hcd *xhci, gfp_t flags) | |||
| 1758 | return -ENOMEM; | 1759 | return -ENOMEM; |
| 1759 | 1760 | ||
| 1760 | port_index = 0; | 1761 | port_index = 0; |
| 1761 | for (i = 0; i < num_ports; i++) | 1762 | for (i = 0; i < num_ports; i++) { |
| 1762 | if (xhci->port_array[i] != 0x03) { | 1763 | if (xhci->port_array[i] == 0x03 || |
| 1763 | xhci->usb2_ports[port_index] = | 1764 | xhci->port_array[i] == 0 || |
| 1764 | &xhci->op_regs->port_status_base + | 1765 | xhci->port_array[i] == -1) |
| 1765 | NUM_PORT_REGS*i; | 1766 | continue; |
| 1766 | xhci_dbg(xhci, "USB 2.0 port at index %u, " | 1767 | |
| 1767 | "addr = %p\n", i, | 1768 | xhci->usb2_ports[port_index] = |
| 1768 | xhci->usb2_ports[port_index]); | 1769 | &xhci->op_regs->port_status_base + |
| 1769 | port_index++; | 1770 | NUM_PORT_REGS*i; |
| 1770 | } | 1771 | xhci_dbg(xhci, "USB 2.0 port at index %u, " |
| 1772 | "addr = %p\n", i, | ||
| 1773 | xhci->usb2_ports[port_index]); | ||
| 1774 | port_index++; | ||
| 1775 | } | ||
| 1771 | } | 1776 | } |
| 1772 | if (xhci->num_usb3_ports) { | 1777 | if (xhci->num_usb3_ports) { |
| 1773 | xhci->usb3_ports = kmalloc(sizeof(*xhci->usb3_ports)* | 1778 | xhci->usb3_ports = kmalloc(sizeof(*xhci->usb3_ports)* |
diff --git a/drivers/usb/misc/uss720.c b/drivers/usb/misc/uss720.c index 796e2f68f749..4ff21587ab03 100644 --- a/drivers/usb/misc/uss720.c +++ b/drivers/usb/misc/uss720.c | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | /* | 3 | /* |
| 4 | * uss720.c -- USS720 USB Parport Cable. | 4 | * uss720.c -- USS720 USB Parport Cable. |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 1999, 2005 | 6 | * Copyright (C) 1999, 2005, 2010 |
| 7 | * Thomas Sailer (t.sailer@alumni.ethz.ch) | 7 | * Thomas Sailer (t.sailer@alumni.ethz.ch) |
| 8 | * | 8 | * |
| 9 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
| @@ -776,6 +776,8 @@ static const struct usb_device_id uss720_table[] = { | |||
| 776 | { USB_DEVICE(0x0557, 0x2001) }, | 776 | { USB_DEVICE(0x0557, 0x2001) }, |
| 777 | { USB_DEVICE(0x0729, 0x1284) }, | 777 | { USB_DEVICE(0x0729, 0x1284) }, |
| 778 | { USB_DEVICE(0x1293, 0x0002) }, | 778 | { USB_DEVICE(0x1293, 0x0002) }, |
| 779 | { USB_DEVICE(0x1293, 0x0002) }, | ||
| 780 | { USB_DEVICE(0x050d, 0x0002) }, | ||
| 779 | { } /* Terminating entry */ | 781 | { } /* Terminating entry */ |
| 780 | }; | 782 | }; |
| 781 | 783 | ||
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 6a50965e23f2..2dec50013528 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
| @@ -796,6 +796,7 @@ static struct usb_device_id id_table_combined [] = { | |||
| 796 | { USB_DEVICE(FTDI_VID, FTDI_SCIENCESCOPE_LOGBOOKML_PID) }, | 796 | { USB_DEVICE(FTDI_VID, FTDI_SCIENCESCOPE_LOGBOOKML_PID) }, |
| 797 | { USB_DEVICE(FTDI_VID, FTDI_SCIENCESCOPE_LS_LOGBOOK_PID) }, | 797 | { USB_DEVICE(FTDI_VID, FTDI_SCIENCESCOPE_LS_LOGBOOK_PID) }, |
| 798 | { USB_DEVICE(FTDI_VID, FTDI_SCIENCESCOPE_HS_LOGBOOK_PID) }, | 798 | { USB_DEVICE(FTDI_VID, FTDI_SCIENCESCOPE_HS_LOGBOOK_PID) }, |
| 799 | { USB_DEVICE(FTDI_VID, FTDI_DOTEC_PID) }, | ||
| 799 | { USB_DEVICE(QIHARDWARE_VID, MILKYMISTONE_JTAGSERIAL_PID), | 800 | { USB_DEVICE(QIHARDWARE_VID, MILKYMISTONE_JTAGSERIAL_PID), |
| 800 | .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, | 801 | .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, |
| 801 | { }, /* Optional parameter entry */ | 802 | { }, /* Optional parameter entry */ |
diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h index 1286f1e23d8c..bf0867285481 100644 --- a/drivers/usb/serial/ftdi_sio_ids.h +++ b/drivers/usb/serial/ftdi_sio_ids.h | |||
| @@ -1081,6 +1081,11 @@ | |||
| 1081 | #define MJSG_HD_RADIO_PID 0x937C | 1081 | #define MJSG_HD_RADIO_PID 0x937C |
| 1082 | 1082 | ||
| 1083 | /* | 1083 | /* |
| 1084 | * D.O.Tec products (http://www.directout.eu) | ||
| 1085 | */ | ||
| 1086 | #define FTDI_DOTEC_PID 0x9868 | ||
| 1087 | |||
| 1088 | /* | ||
| 1084 | * Xverve Signalyzer tools (http://www.signalyzer.com/) | 1089 | * Xverve Signalyzer tools (http://www.signalyzer.com/) |
| 1085 | */ | 1090 | */ |
| 1086 | #define XVERVE_SIGNALYZER_ST_PID 0xBCA0 | 1091 | #define XVERVE_SIGNALYZER_ST_PID 0xBCA0 |
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index 6ccdd3dd5259..fcc1e32ce256 100644 --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h | |||
| @@ -481,6 +481,13 @@ UNUSUAL_DEV( 0x04e8, 0x507c, 0x0220, 0x0220, | |||
| 481 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 481 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
| 482 | US_FL_MAX_SECTORS_64), | 482 | US_FL_MAX_SECTORS_64), |
| 483 | 483 | ||
| 484 | /* Reported by Vitaly Kuznetsov <vitty@altlinux.ru> */ | ||
| 485 | UNUSUAL_DEV( 0x04e8, 0x5122, 0x0000, 0x9999, | ||
| 486 | "Samsung", | ||
| 487 | "YP-CP3", | ||
| 488 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | ||
| 489 | US_FL_MAX_SECTORS_64 | US_FL_BULK_IGNORE_TAG), | ||
| 490 | |||
| 484 | /* Entry and supporting patch by Theodore Kilgore <kilgota@auburn.edu>. | 491 | /* Entry and supporting patch by Theodore Kilgore <kilgota@auburn.edu>. |
| 485 | * Device uses standards-violating 32-byte Bulk Command Block Wrappers and | 492 | * Device uses standards-violating 32-byte Bulk Command Block Wrappers and |
| 486 | * reports itself as "Proprietary SCSI Bulk." Cf. device entry 0x084d:0x0011. | 493 | * reports itself as "Proprietary SCSI Bulk." Cf. device entry 0x084d:0x0011. |
