aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-16 23:42:46 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-16 23:42:46 -0400
commit2bcb132c693566bcb8208cc7ce66b72a4f852ecf (patch)
tree6fc4f05ce18140d86aa78a10380a610734aeaef9 /drivers/usb
parent67e6da702753dac8f0540209dded80a0c4e60d81 (diff)
parent5698bd757d55b1bb87edd1a9744ab09c142abfc2 (diff)
Merge 3.6-rc6 into usb-next
This resolves the merge problems with: drivers/usb/dwc3/gadget.c drivers/usb/musb/tusb6010.c that had been seen in linux-next. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/class/cdc-wdm.c12
-rw-r--r--drivers/usb/core/quirks.c4
-rw-r--r--drivers/usb/dwc3/core.c9
-rw-r--r--drivers/usb/dwc3/ep0.c1
-rw-r--r--drivers/usb/dwc3/gadget.c21
-rw-r--r--drivers/usb/gadget/at91_udc.c6
-rw-r--r--drivers/usb/gadget/dummy_hcd.c41
-rw-r--r--drivers/usb/gadget/f_fs.c4
-rw-r--r--drivers/usb/gadget/u_serial.c4
-rw-r--r--drivers/usb/host/ehci-q.c12
-rw-r--r--drivers/usb/host/ohci-at91.c10
-rw-r--r--drivers/usb/host/pci-quirks.c42
-rw-r--r--drivers/usb/host/pci-quirks.h1
-rw-r--r--drivers/usb/host/xhci-hub.c42
-rw-r--r--drivers/usb/host/xhci-plat.c2
-rw-r--r--drivers/usb/host/xhci.c123
-rw-r--r--drivers/usb/host/xhci.h6
-rw-r--r--drivers/usb/musb/musb_host.c2
-rw-r--r--drivers/usb/musb/musbhsdma.c2
-rw-r--r--drivers/usb/serial/ftdi_sio.c22
-rw-r--r--drivers/usb/serial/ftdi_sio_ids.h29
-rw-r--r--drivers/usb/serial/option.c6
22 files changed, 365 insertions, 36 deletions
diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c
index 65a55abb791f..5f0cb417b736 100644
--- a/drivers/usb/class/cdc-wdm.c
+++ b/drivers/usb/class/cdc-wdm.c
@@ -109,12 +109,14 @@ static struct usb_driver wdm_driver;
109/* return intfdata if we own the interface, else look up intf in the list */ 109/* return intfdata if we own the interface, else look up intf in the list */
110static struct wdm_device *wdm_find_device(struct usb_interface *intf) 110static struct wdm_device *wdm_find_device(struct usb_interface *intf)
111{ 111{
112 struct wdm_device *desc = NULL; 112 struct wdm_device *desc;
113 113
114 spin_lock(&wdm_device_list_lock); 114 spin_lock(&wdm_device_list_lock);
115 list_for_each_entry(desc, &wdm_device_list, device_list) 115 list_for_each_entry(desc, &wdm_device_list, device_list)
116 if (desc->intf == intf) 116 if (desc->intf == intf)
117 break; 117 goto found;
118 desc = NULL;
119found:
118 spin_unlock(&wdm_device_list_lock); 120 spin_unlock(&wdm_device_list_lock);
119 121
120 return desc; 122 return desc;
@@ -122,12 +124,14 @@ static struct wdm_device *wdm_find_device(struct usb_interface *intf)
122 124
123static struct wdm_device *wdm_find_device_by_minor(int minor) 125static struct wdm_device *wdm_find_device_by_minor(int minor)
124{ 126{
125 struct wdm_device *desc = NULL; 127 struct wdm_device *desc;
126 128
127 spin_lock(&wdm_device_list_lock); 129 spin_lock(&wdm_device_list_lock);
128 list_for_each_entry(desc, &wdm_device_list, device_list) 130 list_for_each_entry(desc, &wdm_device_list, device_list)
129 if (desc->intf->minor == minor) 131 if (desc->intf->minor == minor)
130 break; 132 goto found;
133 desc = NULL;
134found:
131 spin_unlock(&wdm_device_list_lock); 135 spin_unlock(&wdm_device_list_lock);
132 136
133 return desc; 137 return desc;
diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
index 2dbb5154f356..fdefd9c7f7af 100644
--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -71,6 +71,10 @@ static const struct usb_device_id usb_quirk_list[] = {
71 { USB_DEVICE(0x04b4, 0x0526), .driver_info = 71 { USB_DEVICE(0x04b4, 0x0526), .driver_info =
72 USB_QUIRK_CONFIG_INTF_STRINGS }, 72 USB_QUIRK_CONFIG_INTF_STRINGS },
73 73
74 /* Microchip Joss Optical infrared touchboard device */
75 { USB_DEVICE(0x04d8, 0x000c), .driver_info =
76 USB_QUIRK_CONFIG_INTF_STRINGS },
77
74 /* Samsung Android phone modem - ID conflict with SPH-I500 */ 78 /* Samsung Android phone modem - ID conflict with SPH-I500 */
75 { USB_DEVICE(0x04e8, 0x6601), .driver_info = 79 { USB_DEVICE(0x04e8, 0x6601), .driver_info =
76 USB_QUIRK_CONFIG_INTF_STRINGS }, 80 USB_QUIRK_CONFIG_INTF_STRINGS },
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index bed2c1615463..b415c0c859d3 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -440,16 +440,21 @@ static int __devinit dwc3_probe(struct platform_device *pdev)
440 dev_err(dev, "missing IRQ\n"); 440 dev_err(dev, "missing IRQ\n");
441 return -ENODEV; 441 return -ENODEV;
442 } 442 }
443 dwc->xhci_resources[1] = *res; 443 dwc->xhci_resources[1].start = res->start;
444 dwc->xhci_resources[1].end = res->end;
445 dwc->xhci_resources[1].flags = res->flags;
446 dwc->xhci_resources[1].name = res->name;
444 447
445 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 448 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
446 if (!res) { 449 if (!res) {
447 dev_err(dev, "missing memory resource\n"); 450 dev_err(dev, "missing memory resource\n");
448 return -ENODEV; 451 return -ENODEV;
449 } 452 }
450 dwc->xhci_resources[0] = *res; 453 dwc->xhci_resources[0].start = res->start;
451 dwc->xhci_resources[0].end = dwc->xhci_resources[0].start + 454 dwc->xhci_resources[0].end = dwc->xhci_resources[0].start +
452 DWC3_XHCI_REGS_END; 455 DWC3_XHCI_REGS_END;
456 dwc->xhci_resources[0].flags = res->flags;
457 dwc->xhci_resources[0].name = res->name;
453 458
454 /* 459 /*
455 * Request memory region but exclude xHCI regs, 460 * Request memory region but exclude xHCI regs,
diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c
index 1bba97ba218d..d7da073a23fe 100644
--- a/drivers/usb/dwc3/ep0.c
+++ b/drivers/usb/dwc3/ep0.c
@@ -792,7 +792,6 @@ static void dwc3_ep0_complete_data(struct dwc3 *dwc,
792 transferred = min_t(u32, ur->length, 792 transferred = min_t(u32, ur->length,
793 transfer_size - length); 793 transfer_size - length);
794 memcpy(ur->buf, dwc->ep0_bounce, transferred); 794 memcpy(ur->buf, dwc->ep0_bounce, transferred);
795 dwc->ep0_bounced = false;
796 } else { 795 } else {
797 transferred = ur->length - length; 796 transferred = ur->length - length;
798 } 797 }
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index ba444e7f9c44..c9e729a4bf65 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -263,8 +263,11 @@ void dwc3_gadget_giveback(struct dwc3_ep *dep, struct dwc3_request *req,
263 if (req->request.status == -EINPROGRESS) 263 if (req->request.status == -EINPROGRESS)
264 req->request.status = status; 264 req->request.status = status;
265 265
266 usb_gadget_unmap_request(&dwc->gadget, &req->request, 266 if (dwc->ep0_bounced && dep->number == 0)
267 req->direction); 267 dwc->ep0_bounced = false;
268 else
269 usb_gadget_unmap_request(&dwc->gadget, &req->request,
270 req->direction);
268 271
269 dev_dbg(dwc->dev, "request %p from %s completed %d/%d ===> %d\n", 272 dev_dbg(dwc->dev, "request %p from %s completed %d/%d ===> %d\n",
270 req, dep->name, req->request.actual, 273 req, dep->name, req->request.actual,
@@ -1017,6 +1020,7 @@ static void __dwc3_gadget_start_isoc(struct dwc3 *dwc,
1017 if (list_empty(&dep->request_list)) { 1020 if (list_empty(&dep->request_list)) {
1018 dev_vdbg(dwc->dev, "ISOC ep %s run out for requests.\n", 1021 dev_vdbg(dwc->dev, "ISOC ep %s run out for requests.\n",
1019 dep->name); 1022 dep->name);
1023 dep->flags |= DWC3_EP_PENDING_REQUEST;
1020 return; 1024 return;
1021 } 1025 }
1022 1026
@@ -1078,6 +1082,19 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req)
1078 * 1082 *
1079 */ 1083 */
1080 if (dep->flags & DWC3_EP_PENDING_REQUEST) { 1084 if (dep->flags & DWC3_EP_PENDING_REQUEST) {
1085 int ret;
1086
1087 /*
1088 * If xfernotready is already elapsed and it is a case
1089 * of isoc transfer, then issue END TRANSFER, so that
1090 * you can receive xfernotready again and can have
1091 * notion of current microframe.
1092 */
1093 if (usb_endpoint_xfer_isoc(dep->endpoint.desc)) {
1094 dwc3_stop_active_transfer(dwc, dep->number);
1095 return 0;
1096 }
1097
1081 ret = __dwc3_gadget_kick_transfer(dep, 0, true); 1098 ret = __dwc3_gadget_kick_transfer(dep, 0, true);
1082 if (ret && ret != -EBUSY) 1099 if (ret && ret != -EBUSY)
1083 dev_dbg(dwc->dev, "%s: failed to kick transfers\n", 1100 dev_dbg(dwc->dev, "%s: failed to kick transfers\n",
diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
index af931282843d..89d90b5fb787 100644
--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -475,8 +475,7 @@ static int at91_ep_enable(struct usb_ep *_ep,
475 unsigned long flags; 475 unsigned long flags;
476 476
477 if (!_ep || !ep 477 if (!_ep || !ep
478 || !desc || ep->ep.desc 478 || !desc || _ep->name == ep0name
479 || _ep->name == ep0name
480 || desc->bDescriptorType != USB_DT_ENDPOINT 479 || desc->bDescriptorType != USB_DT_ENDPOINT
481 || (maxpacket = usb_endpoint_maxp(desc)) == 0 480 || (maxpacket = usb_endpoint_maxp(desc)) == 0
482 || maxpacket > ep->maxpacket) { 481 || maxpacket > ep->maxpacket) {
@@ -531,7 +530,6 @@ ok:
531 tmp |= AT91_UDP_EPEDS; 530 tmp |= AT91_UDP_EPEDS;
532 __raw_writel(tmp, ep->creg); 531 __raw_writel(tmp, ep->creg);
533 532
534 ep->ep.desc = desc;
535 ep->ep.maxpacket = maxpacket; 533 ep->ep.maxpacket = maxpacket;
536 534
537 /* 535 /*
@@ -1636,7 +1634,6 @@ static int at91_start(struct usb_gadget *gadget,
1636 udc->driver = driver; 1634 udc->driver = driver;
1637 udc->gadget.dev.driver = &driver->driver; 1635 udc->gadget.dev.driver = &driver->driver;
1638 udc->gadget.dev.of_node = udc->pdev->dev.of_node; 1636 udc->gadget.dev.of_node = udc->pdev->dev.of_node;
1639 dev_set_drvdata(&udc->gadget.dev, &driver->driver);
1640 udc->enabled = 1; 1637 udc->enabled = 1;
1641 udc->selfpowered = 1; 1638 udc->selfpowered = 1;
1642 1639
@@ -1657,7 +1654,6 @@ static int at91_stop(struct usb_gadget *gadget,
1657 spin_unlock_irqrestore(&udc->lock, flags); 1654 spin_unlock_irqrestore(&udc->lock, flags);
1658 1655
1659 udc->gadget.dev.driver = NULL; 1656 udc->gadget.dev.driver = NULL;
1660 dev_set_drvdata(&udc->gadget.dev, NULL);
1661 udc->driver = NULL; 1657 udc->driver = NULL;
1662 1658
1663 DBG("unbound from %s\n", driver->driver.name); 1659 DBG("unbound from %s\n", driver->driver.name);
diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c
index 91916f693ff7..0f7541be28f3 100644
--- a/drivers/usb/gadget/dummy_hcd.c
+++ b/drivers/usb/gadget/dummy_hcd.c
@@ -1918,6 +1918,27 @@ done:
1918 return retval; 1918 return retval;
1919} 1919}
1920 1920
1921/* usb 3.0 root hub device descriptor */
1922struct {
1923 struct usb_bos_descriptor bos;
1924 struct usb_ss_cap_descriptor ss_cap;
1925} __packed usb3_bos_desc = {
1926
1927 .bos = {
1928 .bLength = USB_DT_BOS_SIZE,
1929 .bDescriptorType = USB_DT_BOS,
1930 .wTotalLength = cpu_to_le16(sizeof(usb3_bos_desc)),
1931 .bNumDeviceCaps = 1,
1932 },
1933 .ss_cap = {
1934 .bLength = USB_DT_USB_SS_CAP_SIZE,
1935 .bDescriptorType = USB_DT_DEVICE_CAPABILITY,
1936 .bDevCapabilityType = USB_SS_CAP_TYPE,
1937 .wSpeedSupported = cpu_to_le16(USB_5GBPS_OPERATION),
1938 .bFunctionalitySupport = ilog2(USB_5GBPS_OPERATION),
1939 },
1940};
1941
1921static inline void 1942static inline void
1922ss_hub_descriptor(struct usb_hub_descriptor *desc) 1943ss_hub_descriptor(struct usb_hub_descriptor *desc)
1923{ 1944{
@@ -2008,6 +2029,18 @@ static int dummy_hub_control(
2008 else 2029 else
2009 hub_descriptor((struct usb_hub_descriptor *) buf); 2030 hub_descriptor((struct usb_hub_descriptor *) buf);
2010 break; 2031 break;
2032
2033 case DeviceRequest | USB_REQ_GET_DESCRIPTOR:
2034 if (hcd->speed != HCD_USB3)
2035 goto error;
2036
2037 if ((wValue >> 8) != USB_DT_BOS)
2038 goto error;
2039
2040 memcpy(buf, &usb3_bos_desc, sizeof(usb3_bos_desc));
2041 retval = sizeof(usb3_bos_desc);
2042 break;
2043
2011 case GetHubStatus: 2044 case GetHubStatus:
2012 *(__le32 *) buf = cpu_to_le32(0); 2045 *(__le32 *) buf = cpu_to_le32(0);
2013 break; 2046 break;
@@ -2505,10 +2538,8 @@ static int dummy_hcd_probe(struct platform_device *pdev)
2505 hs_hcd->has_tt = 1; 2538 hs_hcd->has_tt = 1;
2506 2539
2507 retval = usb_add_hcd(hs_hcd, 0, 0); 2540 retval = usb_add_hcd(hs_hcd, 0, 0);
2508 if (retval != 0) { 2541 if (retval)
2509 usb_put_hcd(hs_hcd); 2542 goto put_usb2_hcd;
2510 return retval;
2511 }
2512 2543
2513 if (mod_data.is_super_speed) { 2544 if (mod_data.is_super_speed) {
2514 ss_hcd = usb_create_shared_hcd(&dummy_hcd, &pdev->dev, 2545 ss_hcd = usb_create_shared_hcd(&dummy_hcd, &pdev->dev,
@@ -2527,6 +2558,8 @@ static int dummy_hcd_probe(struct platform_device *pdev)
2527put_usb3_hcd: 2558put_usb3_hcd:
2528 usb_put_hcd(ss_hcd); 2559 usb_put_hcd(ss_hcd);
2529dealloc_usb2_hcd: 2560dealloc_usb2_hcd:
2561 usb_remove_hcd(hs_hcd);
2562put_usb2_hcd:
2530 usb_put_hcd(hs_hcd); 2563 usb_put_hcd(hs_hcd);
2531 the_controller.hs_hcd = the_controller.ss_hcd = NULL; 2564 the_controller.hs_hcd = the_controller.ss_hcd = NULL;
2532 return retval; 2565 return retval;
diff --git a/drivers/usb/gadget/f_fs.c b/drivers/usb/gadget/f_fs.c
index 8adc79d1b402..829aba75a6df 100644
--- a/drivers/usb/gadget/f_fs.c
+++ b/drivers/usb/gadget/f_fs.c
@@ -34,11 +34,15 @@
34/* Debugging ****************************************************************/ 34/* Debugging ****************************************************************/
35 35
36#ifdef VERBOSE_DEBUG 36#ifdef VERBOSE_DEBUG
37#ifndef pr_vdebug
37# define pr_vdebug pr_debug 38# define pr_vdebug pr_debug
39#endif /* pr_vdebug */
38# define ffs_dump_mem(prefix, ptr, len) \ 40# define ffs_dump_mem(prefix, ptr, len) \
39 print_hex_dump_bytes(pr_fmt(prefix ": "), DUMP_PREFIX_NONE, ptr, len) 41 print_hex_dump_bytes(pr_fmt(prefix ": "), DUMP_PREFIX_NONE, ptr, len)
40#else 42#else
43#ifndef pr_vdebug
41# define pr_vdebug(...) do { } while (0) 44# define pr_vdebug(...) do { } while (0)
45#endif /* pr_vdebug */
42# define ffs_dump_mem(prefix, ptr, len) do { } while (0) 46# define ffs_dump_mem(prefix, ptr, len) do { } while (0)
43#endif /* VERBOSE_DEBUG */ 47#endif /* VERBOSE_DEBUG */
44 48
diff --git a/drivers/usb/gadget/u_serial.c b/drivers/usb/gadget/u_serial.c
index 5b3f5fffea92..da6d479ff9a6 100644
--- a/drivers/usb/gadget/u_serial.c
+++ b/drivers/usb/gadget/u_serial.c
@@ -132,11 +132,15 @@ static unsigned n_ports;
132 132
133 133
134#ifdef VERBOSE_DEBUG 134#ifdef VERBOSE_DEBUG
135#ifndef pr_vdebug
135#define pr_vdebug(fmt, arg...) \ 136#define pr_vdebug(fmt, arg...) \
136 pr_debug(fmt, ##arg) 137 pr_debug(fmt, ##arg)
138#endif /* pr_vdebug */
137#else 139#else
140#ifndef pr_vdebig
138#define pr_vdebug(fmt, arg...) \ 141#define pr_vdebug(fmt, arg...) \
139 ({ if (0) pr_debug(fmt, ##arg); }) 142 ({ if (0) pr_debug(fmt, ##arg); })
143#endif /* pr_vdebug */
140#endif 144#endif
141 145
142/*-------------------------------------------------------------------------*/ 146/*-------------------------------------------------------------------------*/
diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c
index 9bc39ca460c8..4b66374bdc8e 100644
--- a/drivers/usb/host/ehci-q.c
+++ b/drivers/usb/host/ehci-q.c
@@ -128,9 +128,17 @@ qh_refresh (struct ehci_hcd *ehci, struct ehci_qh *qh)
128 else { 128 else {
129 qtd = list_entry (qh->qtd_list.next, 129 qtd = list_entry (qh->qtd_list.next,
130 struct ehci_qtd, qtd_list); 130 struct ehci_qtd, qtd_list);
131 /* first qtd may already be partially processed */ 131 /*
132 if (cpu_to_hc32(ehci, qtd->qtd_dma) == qh->hw->hw_current) 132 * first qtd may already be partially processed.
133 * If we come here during unlink, the QH overlay region
134 * might have reference to the just unlinked qtd. The
135 * qtd is updated in qh_completions(). Update the QH
136 * overlay here.
137 */
138 if (cpu_to_hc32(ehci, qtd->qtd_dma) == qh->hw->hw_current) {
139 qh->hw->hw_qtd_next = qtd->hw_next;
133 qtd = NULL; 140 qtd = NULL;
141 }
134 } 142 }
135 143
136 if (qtd) 144 if (qtd)
diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c
index a665b3eaa746..aaa8d2bce217 100644
--- a/drivers/usb/host/ohci-at91.c
+++ b/drivers/usb/host/ohci-at91.c
@@ -570,6 +570,16 @@ static int __devinit ohci_hcd_at91_drv_probe(struct platform_device *pdev)
570 570
571 if (pdata) { 571 if (pdata) {
572 at91_for_each_port(i) { 572 at91_for_each_port(i) {
573 /*
574 * do not configure PIO if not in relation with
575 * real USB port on board
576 */
577 if (i >= pdata->ports) {
578 pdata->vbus_pin[i] = -EINVAL;
579 pdata->overcurrent_pin[i] = -EINVAL;
580 break;
581 }
582
573 if (!gpio_is_valid(pdata->vbus_pin[i])) 583 if (!gpio_is_valid(pdata->vbus_pin[i]))
574 continue; 584 continue;
575 gpio = pdata->vbus_pin[i]; 585 gpio = pdata->vbus_pin[i];
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
index c5e9e4a76f14..966d1484ee79 100644
--- a/drivers/usb/host/pci-quirks.c
+++ b/drivers/usb/host/pci-quirks.c
@@ -75,7 +75,9 @@
75#define NB_PIF0_PWRDOWN_1 0x01100013 75#define NB_PIF0_PWRDOWN_1 0x01100013
76 76
77#define USB_INTEL_XUSB2PR 0xD0 77#define USB_INTEL_XUSB2PR 0xD0
78#define USB_INTEL_USB2PRM 0xD4
78#define USB_INTEL_USB3_PSSEN 0xD8 79#define USB_INTEL_USB3_PSSEN 0xD8
80#define USB_INTEL_USB3PRM 0xDC
79 81
80static struct amd_chipset_info { 82static struct amd_chipset_info {
81 struct pci_dev *nb_dev; 83 struct pci_dev *nb_dev;
@@ -772,10 +774,18 @@ void usb_enable_xhci_ports(struct pci_dev *xhci_pdev)
772 return; 774 return;
773 } 775 }
774 776
775 ports_available = 0xffffffff; 777 /* Read USB3PRM, the USB 3.0 Port Routing Mask Register
778 * Indicate the ports that can be changed from OS.
779 */
780 pci_read_config_dword(xhci_pdev, USB_INTEL_USB3PRM,
781 &ports_available);
782
783 dev_dbg(&xhci_pdev->dev, "Configurable ports to enable SuperSpeed: 0x%x\n",
784 ports_available);
785
776 /* Write USB3_PSSEN, the USB 3.0 Port SuperSpeed Enable 786 /* Write USB3_PSSEN, the USB 3.0 Port SuperSpeed Enable
777 * Register, to turn on SuperSpeed terminations for all 787 * Register, to turn on SuperSpeed terminations for the
778 * available ports. 788 * switchable ports.
779 */ 789 */
780 pci_write_config_dword(xhci_pdev, USB_INTEL_USB3_PSSEN, 790 pci_write_config_dword(xhci_pdev, USB_INTEL_USB3_PSSEN,
781 cpu_to_le32(ports_available)); 791 cpu_to_le32(ports_available));
@@ -785,7 +795,16 @@ void usb_enable_xhci_ports(struct pci_dev *xhci_pdev)
785 dev_dbg(&xhci_pdev->dev, "USB 3.0 ports that are now enabled " 795 dev_dbg(&xhci_pdev->dev, "USB 3.0 ports that are now enabled "
786 "under xHCI: 0x%x\n", ports_available); 796 "under xHCI: 0x%x\n", ports_available);
787 797
788 ports_available = 0xffffffff; 798 /* Read XUSB2PRM, xHCI USB 2.0 Port Routing Mask Register
799 * Indicate the USB 2.0 ports to be controlled by the xHCI host.
800 */
801
802 pci_read_config_dword(xhci_pdev, USB_INTEL_USB2PRM,
803 &ports_available);
804
805 dev_dbg(&xhci_pdev->dev, "Configurable USB 2.0 ports to hand over to xCHI: 0x%x\n",
806 ports_available);
807
789 /* Write XUSB2PR, the xHC USB 2.0 Port Routing Register, to 808 /* Write XUSB2PR, the xHC USB 2.0 Port Routing Register, to
790 * switch the USB 2.0 power and data lines over to the xHCI 809 * switch the USB 2.0 power and data lines over to the xHCI
791 * host. 810 * host.
@@ -822,12 +841,12 @@ static void __devinit quirk_usb_handoff_xhci(struct pci_dev *pdev)
822 void __iomem *op_reg_base; 841 void __iomem *op_reg_base;
823 u32 val; 842 u32 val;
824 int timeout; 843 int timeout;
844 int len = pci_resource_len(pdev, 0);
825 845
826 if (!mmio_resource_enabled(pdev, 0)) 846 if (!mmio_resource_enabled(pdev, 0))
827 return; 847 return;
828 848
829 base = ioremap_nocache(pci_resource_start(pdev, 0), 849 base = ioremap_nocache(pci_resource_start(pdev, 0), len);
830 pci_resource_len(pdev, 0));
831 if (base == NULL) 850 if (base == NULL)
832 return; 851 return;
833 852
@@ -837,9 +856,17 @@ static void __devinit quirk_usb_handoff_xhci(struct pci_dev *pdev)
837 */ 856 */
838 ext_cap_offset = xhci_find_next_cap_offset(base, XHCI_HCC_PARAMS_OFFSET); 857 ext_cap_offset = xhci_find_next_cap_offset(base, XHCI_HCC_PARAMS_OFFSET);
839 do { 858 do {
859 if ((ext_cap_offset + sizeof(val)) > len) {
860 /* We're reading garbage from the controller */
861 dev_warn(&pdev->dev,
862 "xHCI controller failing to respond");
863 return;
864 }
865
840 if (!ext_cap_offset) 866 if (!ext_cap_offset)
841 /* We've reached the end of the extended capabilities */ 867 /* We've reached the end of the extended capabilities */
842 goto hc_init; 868 goto hc_init;
869
843 val = readl(base + ext_cap_offset); 870 val = readl(base + ext_cap_offset);
844 if (XHCI_EXT_CAPS_ID(val) == XHCI_EXT_CAPS_LEGACY) 871 if (XHCI_EXT_CAPS_ID(val) == XHCI_EXT_CAPS_LEGACY)
845 break; 872 break;
@@ -870,9 +897,10 @@ static void __devinit quirk_usb_handoff_xhci(struct pci_dev *pdev)
870 /* Disable any BIOS SMIs and clear all SMI events*/ 897 /* Disable any BIOS SMIs and clear all SMI events*/
871 writel(val, base + ext_cap_offset + XHCI_LEGACY_CONTROL_OFFSET); 898 writel(val, base + ext_cap_offset + XHCI_LEGACY_CONTROL_OFFSET);
872 899
900hc_init:
873 if (usb_is_intel_switchable_xhci(pdev)) 901 if (usb_is_intel_switchable_xhci(pdev))
874 usb_enable_xhci_ports(pdev); 902 usb_enable_xhci_ports(pdev);
875hc_init: 903
876 op_reg_base = base + XHCI_HC_LENGTH(readl(base)); 904 op_reg_base = base + XHCI_HC_LENGTH(readl(base));
877 905
878 /* Wait for the host controller to be ready before writing any 906 /* Wait for the host controller to be ready before writing any
diff --git a/drivers/usb/host/pci-quirks.h b/drivers/usb/host/pci-quirks.h
index ef004a5de20f..7f69a39163ce 100644
--- a/drivers/usb/host/pci-quirks.h
+++ b/drivers/usb/host/pci-quirks.h
@@ -15,6 +15,7 @@ void usb_disable_xhci_ports(struct pci_dev *xhci_pdev);
15static inline void usb_amd_quirk_pll_disable(void) {} 15static inline void usb_amd_quirk_pll_disable(void) {}
16static inline void usb_amd_quirk_pll_enable(void) {} 16static inline void usb_amd_quirk_pll_enable(void) {}
17static inline void usb_amd_dev_put(void) {} 17static inline void usb_amd_dev_put(void) {}
18static inline void usb_disable_xhci_ports(struct pci_dev *xhci_pdev) {}
18#endif /* CONFIG_PCI */ 19#endif /* CONFIG_PCI */
19 20
20#endif /* __LINUX_USB_PCI_QUIRKS_H */ 21#endif /* __LINUX_USB_PCI_QUIRKS_H */
diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c
index 5896f0588d41..aa90ad4d4fd5 100644
--- a/drivers/usb/host/xhci-hub.c
+++ b/drivers/usb/host/xhci-hub.c
@@ -493,11 +493,48 @@ static void xhci_hub_report_link_state(u32 *status, u32 status_reg)
493 * when this bit is set. 493 * when this bit is set.
494 */ 494 */
495 pls |= USB_PORT_STAT_CONNECTION; 495 pls |= USB_PORT_STAT_CONNECTION;
496 } else {
497 /*
498 * If CAS bit isn't set but the Port is already at
499 * Compliance Mode, fake a connection so the USB core
500 * notices the Compliance state and resets the port.
501 * This resolves an issue generated by the SN65LVPE502CP
502 * in which sometimes the port enters compliance mode
503 * caused by a delay on the host-device negotiation.
504 */
505 if (pls == USB_SS_PORT_LS_COMP_MOD)
506 pls |= USB_PORT_STAT_CONNECTION;
496 } 507 }
508
497 /* update status field */ 509 /* update status field */
498 *status |= pls; 510 *status |= pls;
499} 511}
500 512
513/*
514 * Function for Compliance Mode Quirk.
515 *
516 * This Function verifies if all xhc USB3 ports have entered U0, if so,
517 * the compliance mode timer is deleted. A port won't enter
518 * compliance mode if it has previously entered U0.
519 */
520void xhci_del_comp_mod_timer(struct xhci_hcd *xhci, u32 status, u16 wIndex)
521{
522 u32 all_ports_seen_u0 = ((1 << xhci->num_usb3_ports)-1);
523 bool port_in_u0 = ((status & PORT_PLS_MASK) == XDEV_U0);
524
525 if (!(xhci->quirks & XHCI_COMP_MODE_QUIRK))
526 return;
527
528 if ((xhci->port_status_u0 != all_ports_seen_u0) && port_in_u0) {
529 xhci->port_status_u0 |= 1 << wIndex;
530 if (xhci->port_status_u0 == all_ports_seen_u0) {
531 del_timer_sync(&xhci->comp_mode_recovery_timer);
532 xhci_dbg(xhci, "All USB3 ports have entered U0 already!\n");
533 xhci_dbg(xhci, "Compliance Mode Recovery Timer Deleted.\n");
534 }
535 }
536}
537
501int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, 538int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
502 u16 wIndex, char *buf, u16 wLength) 539 u16 wIndex, char *buf, u16 wLength)
503{ 540{
@@ -651,6 +688,11 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
651 /* Update Port Link State for super speed ports*/ 688 /* Update Port Link State for super speed ports*/
652 if (hcd->speed == HCD_USB3) { 689 if (hcd->speed == HCD_USB3) {
653 xhci_hub_report_link_state(&status, temp); 690 xhci_hub_report_link_state(&status, temp);
691 /*
692 * Verify if all USB3 Ports Have entered U0 already.
693 * Delete Compliance Mode Timer if so.
694 */
695 xhci_del_comp_mod_timer(xhci, temp, wIndex);
654 } 696 }
655 if (bus_state->port_c_suspend & (1 << wIndex)) 697 if (bus_state->port_c_suspend & (1 << wIndex))
656 status |= 1 << USB_PORT_FEAT_C_SUSPEND; 698 status |= 1 << USB_PORT_FEAT_C_SUSPEND;
diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
index 689bc18b051d..df90fe51b4aa 100644
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -118,7 +118,7 @@ static int xhci_plat_probe(struct platform_device *pdev)
118 goto put_hcd; 118 goto put_hcd;
119 } 119 }
120 120
121 hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len); 121 hcd->regs = ioremap_nocache(hcd->rsrc_start, hcd->rsrc_len);
122 if (!hcd->regs) { 122 if (!hcd->regs) {
123 dev_dbg(&pdev->dev, "error mapping memory\n"); 123 dev_dbg(&pdev->dev, "error mapping memory\n");
124 ret = -EFAULT; 124 ret = -EFAULT;
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 66bc5c3985fb..a4b0ce13fa0c 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -26,6 +26,7 @@
26#include <linux/module.h> 26#include <linux/module.h>
27#include <linux/moduleparam.h> 27#include <linux/moduleparam.h>
28#include <linux/slab.h> 28#include <linux/slab.h>
29#include <linux/dmi.h>
29 30
30#include "xhci.h" 31#include "xhci.h"
31 32
@@ -399,6 +400,95 @@ static void xhci_msix_sync_irqs(struct xhci_hcd *xhci)
399 400
400#endif 401#endif
401 402
403static void compliance_mode_recovery(unsigned long arg)
404{
405 struct xhci_hcd *xhci;
406 struct usb_hcd *hcd;
407 u32 temp;
408 int i;
409
410 xhci = (struct xhci_hcd *)arg;
411
412 for (i = 0; i < xhci->num_usb3_ports; i++) {
413 temp = xhci_readl(xhci, xhci->usb3_ports[i]);
414 if ((temp & PORT_PLS_MASK) == USB_SS_PORT_LS_COMP_MOD) {
415 /*
416 * Compliance Mode Detected. Letting USB Core
417 * handle the Warm Reset
418 */
419 xhci_dbg(xhci, "Compliance Mode Detected->Port %d!\n",
420 i + 1);
421 xhci_dbg(xhci, "Attempting Recovery routine!\n");
422 hcd = xhci->shared_hcd;
423
424 if (hcd->state == HC_STATE_SUSPENDED)
425 usb_hcd_resume_root_hub(hcd);
426
427 usb_hcd_poll_rh_status(hcd);
428 }
429 }
430
431 if (xhci->port_status_u0 != ((1 << xhci->num_usb3_ports)-1))
432 mod_timer(&xhci->comp_mode_recovery_timer,
433 jiffies + msecs_to_jiffies(COMP_MODE_RCVRY_MSECS));
434}
435
436/*
437 * Quirk to work around issue generated by the SN65LVPE502CP USB3.0 re-driver
438 * that causes ports behind that hardware to enter compliance mode sometimes.
439 * The quirk creates a timer that polls every 2 seconds the link state of
440 * each host controller's port and recovers it by issuing a Warm reset
441 * if Compliance mode is detected, otherwise the port will become "dead" (no
442 * device connections or disconnections will be detected anymore). Becasue no
443 * status event is generated when entering compliance mode (per xhci spec),
444 * this quirk is needed on systems that have the failing hardware installed.
445 */
446static void compliance_mode_recovery_timer_init(struct xhci_hcd *xhci)
447{
448 xhci->port_status_u0 = 0;
449 init_timer(&xhci->comp_mode_recovery_timer);
450
451 xhci->comp_mode_recovery_timer.data = (unsigned long) xhci;
452 xhci->comp_mode_recovery_timer.function = compliance_mode_recovery;
453 xhci->comp_mode_recovery_timer.expires = jiffies +
454 msecs_to_jiffies(COMP_MODE_RCVRY_MSECS);
455
456 set_timer_slack(&xhci->comp_mode_recovery_timer,
457 msecs_to_jiffies(COMP_MODE_RCVRY_MSECS));
458 add_timer(&xhci->comp_mode_recovery_timer);
459 xhci_dbg(xhci, "Compliance Mode Recovery Timer Initialized.\n");
460}
461
462/*
463 * This function identifies the systems that have installed the SN65LVPE502CP
464 * USB3.0 re-driver and that need the Compliance Mode Quirk.
465 * Systems:
466 * Vendor: Hewlett-Packard -> System Models: Z420, Z620 and Z820
467 */
468static bool compliance_mode_recovery_timer_quirk_check(void)
469{
470 const char *dmi_product_name, *dmi_sys_vendor;
471
472 dmi_product_name = dmi_get_system_info(DMI_PRODUCT_NAME);
473 dmi_sys_vendor = dmi_get_system_info(DMI_SYS_VENDOR);
474
475 if (!(strstr(dmi_sys_vendor, "Hewlett-Packard")))
476 return false;
477
478 if (strstr(dmi_product_name, "Z420") ||
479 strstr(dmi_product_name, "Z620") ||
480 strstr(dmi_product_name, "Z820"))
481 return true;
482
483 return false;
484}
485
486static int xhci_all_ports_seen_u0(struct xhci_hcd *xhci)
487{
488 return (xhci->port_status_u0 == ((1 << xhci->num_usb3_ports)-1));
489}
490
491
402/* 492/*
403 * Initialize memory for HCD and xHC (one-time init). 493 * Initialize memory for HCD and xHC (one-time init).
404 * 494 *
@@ -422,6 +512,12 @@ int xhci_init(struct usb_hcd *hcd)
422 retval = xhci_mem_init(xhci, GFP_KERNEL); 512 retval = xhci_mem_init(xhci, GFP_KERNEL);
423 xhci_dbg(xhci, "Finished xhci_init\n"); 513 xhci_dbg(xhci, "Finished xhci_init\n");
424 514
515 /* Initializing Compliance Mode Recovery Data If Needed */
516 if (compliance_mode_recovery_timer_quirk_check()) {
517 xhci->quirks |= XHCI_COMP_MODE_QUIRK;
518 compliance_mode_recovery_timer_init(xhci);
519 }
520
425 return retval; 521 return retval;
426} 522}
427 523
@@ -631,6 +727,11 @@ void xhci_stop(struct usb_hcd *hcd)
631 del_timer_sync(&xhci->event_ring_timer); 727 del_timer_sync(&xhci->event_ring_timer);
632#endif 728#endif
633 729
730 /* Deleting Compliance Mode Recovery Timer */
731 if ((xhci->quirks & XHCI_COMP_MODE_QUIRK) &&
732 (!(xhci_all_ports_seen_u0(xhci))))
733 del_timer_sync(&xhci->comp_mode_recovery_timer);
734
634 if (xhci->quirks & XHCI_AMD_PLL_FIX) 735 if (xhci->quirks & XHCI_AMD_PLL_FIX)
635 usb_amd_dev_put(); 736 usb_amd_dev_put();
636 737
@@ -661,7 +762,7 @@ void xhci_shutdown(struct usb_hcd *hcd)
661{ 762{
662 struct xhci_hcd *xhci = hcd_to_xhci(hcd); 763 struct xhci_hcd *xhci = hcd_to_xhci(hcd);
663 764
664 if (xhci->quirks && XHCI_SPURIOUS_REBOOT) 765 if (xhci->quirks & XHCI_SPURIOUS_REBOOT)
665 usb_disable_xhci_ports(to_pci_dev(hcd->self.controller)); 766 usb_disable_xhci_ports(to_pci_dev(hcd->self.controller));
666 767
667 spin_lock_irq(&xhci->lock); 768 spin_lock_irq(&xhci->lock);
@@ -808,6 +909,16 @@ int xhci_suspend(struct xhci_hcd *xhci)
808 } 909 }
809 spin_unlock_irq(&xhci->lock); 910 spin_unlock_irq(&xhci->lock);
810 911
912 /*
913 * Deleting Compliance Mode Recovery Timer because the xHCI Host
914 * is about to be suspended.
915 */
916 if ((xhci->quirks & XHCI_COMP_MODE_QUIRK) &&
917 (!(xhci_all_ports_seen_u0(xhci)))) {
918 del_timer_sync(&xhci->comp_mode_recovery_timer);
919 xhci_dbg(xhci, "Compliance Mode Recovery Timer Deleted!\n");
920 }
921
811 /* step 5: remove core well power */ 922 /* step 5: remove core well power */
812 /* synchronize irq when using MSI-X */ 923 /* synchronize irq when using MSI-X */
813 xhci_msix_sync_irqs(xhci); 924 xhci_msix_sync_irqs(xhci);
@@ -940,6 +1051,16 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
940 usb_hcd_resume_root_hub(hcd); 1051 usb_hcd_resume_root_hub(hcd);
941 usb_hcd_resume_root_hub(xhci->shared_hcd); 1052 usb_hcd_resume_root_hub(xhci->shared_hcd);
942 } 1053 }
1054
1055 /*
1056 * If system is subject to the Quirk, Compliance Mode Timer needs to
1057 * be re-initialized Always after a system resume. Ports are subject
1058 * to suffer the Compliance Mode issue again. It doesn't matter if
1059 * ports have entered previously to U0 before system's suspension.
1060 */
1061 if (xhci->quirks & XHCI_COMP_MODE_QUIRK)
1062 compliance_mode_recovery_timer_init(xhci);
1063
943 return retval; 1064 return retval;
944} 1065}
945#endif /* CONFIG_PM */ 1066#endif /* CONFIG_PM */
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index e81ccfa3552f..e44e2d3c83b0 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1510,6 +1510,7 @@ struct xhci_hcd {
1510#define XHCI_LPM_SUPPORT (1 << 11) 1510#define XHCI_LPM_SUPPORT (1 << 11)
1511#define XHCI_INTEL_HOST (1 << 12) 1511#define XHCI_INTEL_HOST (1 << 12)
1512#define XHCI_SPURIOUS_REBOOT (1 << 13) 1512#define XHCI_SPURIOUS_REBOOT (1 << 13)
1513#define XHCI_COMP_MODE_QUIRK (1 << 14)
1513 unsigned int num_active_eps; 1514 unsigned int num_active_eps;
1514 unsigned int limit_active_eps; 1515 unsigned int limit_active_eps;
1515 /* There are two roothubs to keep track of bus suspend info for */ 1516 /* There are two roothubs to keep track of bus suspend info for */
@@ -1526,6 +1527,11 @@ struct xhci_hcd {
1526 unsigned sw_lpm_support:1; 1527 unsigned sw_lpm_support:1;
1527 /* support xHCI 1.0 spec USB2 hardware LPM */ 1528 /* support xHCI 1.0 spec USB2 hardware LPM */
1528 unsigned hw_lpm_support:1; 1529 unsigned hw_lpm_support:1;
1530 /* Compliance Mode Recovery Data */
1531 struct timer_list comp_mode_recovery_timer;
1532 u32 port_status_u0;
1533/* Compliance Mode Timer Triggered every 2 seconds */
1534#define COMP_MODE_RCVRY_MSECS 2000
1529}; 1535};
1530 1536
1531/* convert between an HCD pointer and the corresponding EHCI_HCD */ 1537/* convert between an HCD pointer and the corresponding EHCI_HCD */
diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
index d385e8a8187d..3df6a76b851d 100644
--- a/drivers/usb/musb/musb_host.c
+++ b/drivers/usb/musb/musb_host.c
@@ -2177,7 +2177,7 @@ static int musb_urb_enqueue(
2177 * we only have work to do in the former case. 2177 * we only have work to do in the former case.
2178 */ 2178 */
2179 spin_lock_irqsave(&musb->lock, flags); 2179 spin_lock_irqsave(&musb->lock, flags);
2180 if (hep->hcpriv) { 2180 if (hep->hcpriv || !next_urb(qh)) {
2181 /* some concurrent activity submitted another urb to hep... 2181 /* some concurrent activity submitted another urb to hep...
2182 * odd, rare, error prone, but legal. 2182 * odd, rare, error prone, but legal.
2183 */ 2183 */
diff --git a/drivers/usb/musb/musbhsdma.c b/drivers/usb/musb/musbhsdma.c
index 444b9ee06490..0fc6ca6bc60a 100644
--- a/drivers/usb/musb/musbhsdma.c
+++ b/drivers/usb/musb/musbhsdma.c
@@ -388,7 +388,7 @@ dma_controller_create(struct musb *musb, void __iomem *base)
388 struct platform_device *pdev = to_platform_device(dev); 388 struct platform_device *pdev = to_platform_device(dev);
389 int irq = platform_get_irq_byname(pdev, "dma"); 389 int irq = platform_get_irq_byname(pdev, "dma");
390 390
391 if (irq == 0) { 391 if (irq <= 0) {
392 dev_err(dev, "No DMA interrupt line!\n"); 392 dev_err(dev, "No DMA interrupt line!\n");
393 return NULL; 393 return NULL;
394 } 394 }
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 6d77d2cb938f..dcc05fdb01bc 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -703,6 +703,7 @@ static struct usb_device_id id_table_combined [] = {
703 { USB_DEVICE(FTDI_VID, FTDI_PCDJ_DAC2_PID) }, 703 { USB_DEVICE(FTDI_VID, FTDI_PCDJ_DAC2_PID) },
704 { USB_DEVICE(FTDI_VID, FTDI_RRCIRKITS_LOCOBUFFER_PID) }, 704 { USB_DEVICE(FTDI_VID, FTDI_RRCIRKITS_LOCOBUFFER_PID) },
705 { USB_DEVICE(FTDI_VID, FTDI_ASK_RDR400_PID) }, 705 { USB_DEVICE(FTDI_VID, FTDI_ASK_RDR400_PID) },
706 { USB_DEVICE(FTDI_VID, FTDI_NZR_SEM_USB_PID) },
706 { USB_DEVICE(ICOM_VID, ICOM_ID_1_PID) }, 707 { USB_DEVICE(ICOM_VID, ICOM_ID_1_PID) },
707 { USB_DEVICE(ICOM_VID, ICOM_OPC_U_UC_PID) }, 708 { USB_DEVICE(ICOM_VID, ICOM_OPC_U_UC_PID) },
708 { USB_DEVICE(ICOM_VID, ICOM_ID_RP2C1_PID) }, 709 { USB_DEVICE(ICOM_VID, ICOM_ID_RP2C1_PID) },
@@ -803,13 +804,32 @@ static struct usb_device_id id_table_combined [] = {
803 .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, 804 .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
804 { USB_DEVICE(ADI_VID, ADI_GNICEPLUS_PID), 805 { USB_DEVICE(ADI_VID, ADI_GNICEPLUS_PID),
805 .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, 806 .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
806 { USB_DEVICE(MICROCHIP_VID, MICROCHIP_USB_BOARD_PID) }, 807 { USB_DEVICE_AND_INTERFACE_INFO(MICROCHIP_VID, MICROCHIP_USB_BOARD_PID,
808 USB_CLASS_VENDOR_SPEC,
809 USB_SUBCLASS_VENDOR_SPEC, 0x00) },
807 { USB_DEVICE(JETI_VID, JETI_SPC1201_PID) }, 810 { USB_DEVICE(JETI_VID, JETI_SPC1201_PID) },
808 { USB_DEVICE(MARVELL_VID, MARVELL_SHEEVAPLUG_PID), 811 { USB_DEVICE(MARVELL_VID, MARVELL_SHEEVAPLUG_PID),
809 .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, 812 .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
810 { USB_DEVICE(LARSENBRUSGAARD_VID, LB_ALTITRACK_PID) }, 813 { USB_DEVICE(LARSENBRUSGAARD_VID, LB_ALTITRACK_PID) },
811 { USB_DEVICE(GN_OTOMETRICS_VID, AURICAL_USB_PID) }, 814 { USB_DEVICE(GN_OTOMETRICS_VID, AURICAL_USB_PID) },
815 { USB_DEVICE(FTDI_VID, PI_C865_PID) },
816 { USB_DEVICE(FTDI_VID, PI_C857_PID) },
817 { USB_DEVICE(PI_VID, PI_C866_PID) },
818 { USB_DEVICE(PI_VID, PI_C663_PID) },
819 { USB_DEVICE(PI_VID, PI_C725_PID) },
820 { USB_DEVICE(PI_VID, PI_E517_PID) },
821 { USB_DEVICE(PI_VID, PI_C863_PID) },
812 { USB_DEVICE(PI_VID, PI_E861_PID) }, 822 { USB_DEVICE(PI_VID, PI_E861_PID) },
823 { USB_DEVICE(PI_VID, PI_C867_PID) },
824 { USB_DEVICE(PI_VID, PI_E609_PID) },
825 { USB_DEVICE(PI_VID, PI_E709_PID) },
826 { USB_DEVICE(PI_VID, PI_100F_PID) },
827 { USB_DEVICE(PI_VID, PI_1011_PID) },
828 { USB_DEVICE(PI_VID, PI_1012_PID) },
829 { USB_DEVICE(PI_VID, PI_1013_PID) },
830 { USB_DEVICE(PI_VID, PI_1014_PID) },
831 { USB_DEVICE(PI_VID, PI_1015_PID) },
832 { USB_DEVICE(PI_VID, PI_1016_PID) },
813 { USB_DEVICE(KONDO_VID, KONDO_USB_SERIAL_PID) }, 833 { USB_DEVICE(KONDO_VID, KONDO_USB_SERIAL_PID) },
814 { USB_DEVICE(BAYER_VID, BAYER_CONTOUR_CABLE_PID) }, 834 { USB_DEVICE(BAYER_VID, BAYER_CONTOUR_CABLE_PID) },
815 { USB_DEVICE(FTDI_VID, MARVELL_OPENRD_PID), 835 { USB_DEVICE(FTDI_VID, MARVELL_OPENRD_PID),
diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h
index 5dd96ca6c380..41fe5826100c 100644
--- a/drivers/usb/serial/ftdi_sio_ids.h
+++ b/drivers/usb/serial/ftdi_sio_ids.h
@@ -75,6 +75,9 @@
75#define FTDI_OPENDCC_GATEWAY_PID 0xBFDB 75#define FTDI_OPENDCC_GATEWAY_PID 0xBFDB
76#define FTDI_OPENDCC_GBM_PID 0xBFDC 76#define FTDI_OPENDCC_GBM_PID 0xBFDC
77 77
78/* NZR SEM 16+ USB (http://www.nzr.de) */
79#define FTDI_NZR_SEM_USB_PID 0xC1E0 /* NZR SEM-LOG16+ */
80
78/* 81/*
79 * RR-CirKits LocoBuffer USB (http://www.rr-cirkits.com) 82 * RR-CirKits LocoBuffer USB (http://www.rr-cirkits.com)
80 */ 83 */
@@ -539,7 +542,10 @@
539/* 542/*
540 * Microchip Technology, Inc. 543 * Microchip Technology, Inc.
541 * 544 *
542 * MICROCHIP_VID (0x04D8) and MICROCHIP_USB_BOARD_PID (0x000A) are also used by: 545 * MICROCHIP_VID (0x04D8) and MICROCHIP_USB_BOARD_PID (0x000A) are
546 * used by single function CDC ACM class based firmware demo
547 * applications. The VID/PID has also been used in firmware
548 * emulating FTDI serial chips by:
543 * Hornby Elite - Digital Command Control Console 549 * Hornby Elite - Digital Command Control Console
544 * http://www.hornby.com/hornby-dcc/controllers/ 550 * http://www.hornby.com/hornby-dcc/controllers/
545 */ 551 */
@@ -791,8 +797,27 @@
791 * Physik Instrumente 797 * Physik Instrumente
792 * http://www.physikinstrumente.com/en/products/ 798 * http://www.physikinstrumente.com/en/products/
793 */ 799 */
800/* These two devices use the VID of FTDI */
801#define PI_C865_PID 0xe0a0 /* PI C-865 Piezomotor Controller */
802#define PI_C857_PID 0xe0a1 /* PI Encoder Trigger Box */
803
794#define PI_VID 0x1a72 /* Vendor ID */ 804#define PI_VID 0x1a72 /* Vendor ID */
795#define PI_E861_PID 0x1008 /* E-861 piezo controller USB connection */ 805#define PI_C866_PID 0x1000 /* PI C-866 Piezomotor Controller */
806#define PI_C663_PID 0x1001 /* PI C-663 Mercury-Step */
807#define PI_C725_PID 0x1002 /* PI C-725 Piezomotor Controller */
808#define PI_E517_PID 0x1005 /* PI E-517 Digital Piezo Controller Operation Module */
809#define PI_C863_PID 0x1007 /* PI C-863 */
810#define PI_E861_PID 0x1008 /* PI E-861 Piezomotor Controller */
811#define PI_C867_PID 0x1009 /* PI C-867 Piezomotor Controller */
812#define PI_E609_PID 0x100D /* PI E-609 Digital Piezo Controller */
813#define PI_E709_PID 0x100E /* PI E-709 Digital Piezo Controller */
814#define PI_100F_PID 0x100F /* PI Digital Piezo Controller */
815#define PI_1011_PID 0x1011 /* PI Digital Piezo Controller */
816#define PI_1012_PID 0x1012 /* PI Motion Controller */
817#define PI_1013_PID 0x1013 /* PI Motion Controller */
818#define PI_1014_PID 0x1014 /* PI Device */
819#define PI_1015_PID 0x1015 /* PI Device */
820#define PI_1016_PID 0x1016 /* PI Digital Servo Module */
796 821
797/* 822/*
798 * Kondo Kagaku Co.Ltd. 823 * Kondo Kagaku Co.Ltd.
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index 3229368eaab2..53bd5f491c5d 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -886,8 +886,6 @@ static const struct usb_device_id option_ids[] = {
886 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1010, 0xff, 0xff, 0xff), 886 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1010, 0xff, 0xff, 0xff),
887 .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, 887 .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
888 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1012, 0xff, 0xff, 0xff) }, 888 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1012, 0xff, 0xff, 0xff) },
889 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1018, 0xff, 0xff, 0xff),
890 .driver_info = (kernel_ulong_t)&net_intf3_blacklist },
891 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1057, 0xff, 0xff, 0xff) }, 889 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1057, 0xff, 0xff, 0xff) },
892 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1058, 0xff, 0xff, 0xff) }, 890 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1058, 0xff, 0xff, 0xff) },
893 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1059, 0xff, 0xff, 0xff) }, 891 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1059, 0xff, 0xff, 0xff) },
@@ -1092,6 +1090,10 @@ static const struct usb_device_id option_ids[] = {
1092 .driver_info = (kernel_ulong_t)&zte_ad3812_z_blacklist }, 1090 .driver_info = (kernel_ulong_t)&zte_ad3812_z_blacklist },
1093 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MC2716, 0xff, 0xff, 0xff), 1091 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MC2716, 0xff, 0xff, 0xff),
1094 .driver_info = (kernel_ulong_t)&zte_mc2716_z_blacklist }, 1092 .driver_info = (kernel_ulong_t)&zte_mc2716_z_blacklist },
1093 { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x02, 0x01) },
1094 { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x02, 0x05) },
1095 { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x86, 0x10) },
1096
1095 { USB_DEVICE(BENQ_VENDOR_ID, BENQ_PRODUCT_H10) }, 1097 { USB_DEVICE(BENQ_VENDOR_ID, BENQ_PRODUCT_H10) },
1096 { USB_DEVICE(DLINK_VENDOR_ID, DLINK_PRODUCT_DWM_652) }, 1098 { USB_DEVICE(DLINK_VENDOR_ID, DLINK_PRODUCT_DWM_652) },
1097 { USB_DEVICE(ALINK_VENDOR_ID, DLINK_PRODUCT_DWM_652_U5) }, /* Yes, ALINK_VENDOR_ID */ 1099 { USB_DEVICE(ALINK_VENDOR_ID, DLINK_PRODUCT_DWM_652_U5) }, /* Yes, ALINK_VENDOR_ID */