diff options
Diffstat (limited to 'drivers/usb')
32 files changed, 225 insertions, 133 deletions
diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index 49b098bedf9b..475c9c114689 100644 --- a/drivers/usb/chipidea/core.c +++ b/drivers/usb/chipidea/core.c | |||
@@ -276,8 +276,9 @@ static void ci_role_work(struct work_struct *work) | |||
276 | 276 | ||
277 | ci_role_stop(ci); | 277 | ci_role_stop(ci); |
278 | ci_role_start(ci, role); | 278 | ci_role_start(ci, role); |
279 | enable_irq(ci->irq); | ||
280 | } | 279 | } |
280 | |||
281 | enable_irq(ci->irq); | ||
281 | } | 282 | } |
282 | 283 | ||
283 | static irqreturn_t ci_irq(int irq, void *data) | 284 | static irqreturn_t ci_irq(int irq, void *data) |
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index 519ead2443c5..b501346484ae 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c | |||
@@ -1678,8 +1678,11 @@ static int udc_start(struct ci13xxx *ci) | |||
1678 | 1678 | ||
1679 | ci->gadget.ep0 = &ci->ep0in->ep; | 1679 | ci->gadget.ep0 = &ci->ep0in->ep; |
1680 | 1680 | ||
1681 | if (ci->global_phy) | 1681 | if (ci->global_phy) { |
1682 | ci->transceiver = usb_get_phy(USB_PHY_TYPE_USB2); | 1682 | ci->transceiver = usb_get_phy(USB_PHY_TYPE_USB2); |
1683 | if (IS_ERR(ci->transceiver)) | ||
1684 | ci->transceiver = NULL; | ||
1685 | } | ||
1683 | 1686 | ||
1684 | if (ci->platdata->flags & CI13XXX_REQUIRE_TRANSCEIVER) { | 1687 | if (ci->platdata->flags & CI13XXX_REQUIRE_TRANSCEIVER) { |
1685 | if (ci->transceiver == NULL) { | 1688 | if (ci->transceiver == NULL) { |
@@ -1694,7 +1697,7 @@ static int udc_start(struct ci13xxx *ci) | |||
1694 | goto put_transceiver; | 1697 | goto put_transceiver; |
1695 | } | 1698 | } |
1696 | 1699 | ||
1697 | if (!IS_ERR_OR_NULL(ci->transceiver)) { | 1700 | if (ci->transceiver) { |
1698 | retval = otg_set_peripheral(ci->transceiver->otg, | 1701 | retval = otg_set_peripheral(ci->transceiver->otg, |
1699 | &ci->gadget); | 1702 | &ci->gadget); |
1700 | if (retval) | 1703 | if (retval) |
@@ -1711,7 +1714,7 @@ static int udc_start(struct ci13xxx *ci) | |||
1711 | return retval; | 1714 | return retval; |
1712 | 1715 | ||
1713 | remove_trans: | 1716 | remove_trans: |
1714 | if (!IS_ERR_OR_NULL(ci->transceiver)) { | 1717 | if (ci->transceiver) { |
1715 | otg_set_peripheral(ci->transceiver->otg, NULL); | 1718 | otg_set_peripheral(ci->transceiver->otg, NULL); |
1716 | if (ci->global_phy) | 1719 | if (ci->global_phy) |
1717 | usb_put_phy(ci->transceiver); | 1720 | usb_put_phy(ci->transceiver); |
@@ -1719,7 +1722,7 @@ remove_trans: | |||
1719 | 1722 | ||
1720 | dev_err(dev, "error = %i\n", retval); | 1723 | dev_err(dev, "error = %i\n", retval); |
1721 | put_transceiver: | 1724 | put_transceiver: |
1722 | if (!IS_ERR_OR_NULL(ci->transceiver) && ci->global_phy) | 1725 | if (ci->transceiver && ci->global_phy) |
1723 | usb_put_phy(ci->transceiver); | 1726 | usb_put_phy(ci->transceiver); |
1724 | destroy_eps: | 1727 | destroy_eps: |
1725 | destroy_eps(ci); | 1728 | destroy_eps(ci); |
@@ -1747,7 +1750,7 @@ static void udc_stop(struct ci13xxx *ci) | |||
1747 | dma_pool_destroy(ci->td_pool); | 1750 | dma_pool_destroy(ci->td_pool); |
1748 | dma_pool_destroy(ci->qh_pool); | 1751 | dma_pool_destroy(ci->qh_pool); |
1749 | 1752 | ||
1750 | if (!IS_ERR_OR_NULL(ci->transceiver)) { | 1753 | if (ci->transceiver) { |
1751 | otg_set_peripheral(ci->transceiver->otg, NULL); | 1754 | otg_set_peripheral(ci->transceiver->otg, NULL); |
1752 | if (ci->global_phy) | 1755 | if (ci->global_phy) |
1753 | usb_put_phy(ci->transceiver); | 1756 | usb_put_phy(ci->transceiver); |
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index caefc800f298..c88c4fb9459d 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c | |||
@@ -1287,9 +1287,13 @@ static int proc_do_submiturb(struct dev_state *ps, struct usbdevfs_urb *uurb, | |||
1287 | goto error; | 1287 | goto error; |
1288 | } | 1288 | } |
1289 | for (totlen = u = 0; u < uurb->number_of_packets; u++) { | 1289 | for (totlen = u = 0; u < uurb->number_of_packets; u++) { |
1290 | /* arbitrary limit, | 1290 | /* |
1291 | * sufficient for USB 2.0 high-bandwidth iso */ | 1291 | * arbitrary limit need for USB 3.0 |
1292 | if (isopkt[u].length > 8192) { | 1292 | * bMaxBurst (0~15 allowed, 1~16 packets) |
1293 | * bmAttributes (bit 1:0, mult 0~2, 1~3 packets) | ||
1294 | * sizemax: 1024 * 16 * 3 = 49152 | ||
1295 | */ | ||
1296 | if (isopkt[u].length > 49152) { | ||
1293 | ret = -EINVAL; | 1297 | ret = -EINVAL; |
1294 | goto error; | 1298 | goto error; |
1295 | } | 1299 | } |
diff --git a/drivers/usb/dwc3/dwc3-exynos.c b/drivers/usb/dwc3/dwc3-exynos.c index 929e7dd6e58b..8ce9d7fd6cfc 100644 --- a/drivers/usb/dwc3/dwc3-exynos.c +++ b/drivers/usb/dwc3/dwc3-exynos.c | |||
@@ -164,9 +164,9 @@ static int dwc3_exynos_remove(struct platform_device *pdev) | |||
164 | { | 164 | { |
165 | struct dwc3_exynos *exynos = platform_get_drvdata(pdev); | 165 | struct dwc3_exynos *exynos = platform_get_drvdata(pdev); |
166 | 166 | ||
167 | device_for_each_child(&pdev->dev, NULL, dwc3_exynos_remove_child); | ||
167 | platform_device_unregister(exynos->usb2_phy); | 168 | platform_device_unregister(exynos->usb2_phy); |
168 | platform_device_unregister(exynos->usb3_phy); | 169 | platform_device_unregister(exynos->usb3_phy); |
169 | device_for_each_child(&pdev->dev, NULL, dwc3_exynos_remove_child); | ||
170 | 170 | ||
171 | clk_disable_unprepare(exynos->clk); | 171 | clk_disable_unprepare(exynos->clk); |
172 | 172 | ||
diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c index 227d4a7acad7..eba9e2baf32b 100644 --- a/drivers/usb/dwc3/dwc3-pci.c +++ b/drivers/usb/dwc3/dwc3-pci.c | |||
@@ -196,9 +196,9 @@ static void dwc3_pci_remove(struct pci_dev *pci) | |||
196 | { | 196 | { |
197 | struct dwc3_pci *glue = pci_get_drvdata(pci); | 197 | struct dwc3_pci *glue = pci_get_drvdata(pci); |
198 | 198 | ||
199 | platform_device_unregister(glue->dwc3); | ||
199 | platform_device_unregister(glue->usb2_phy); | 200 | platform_device_unregister(glue->usb2_phy); |
200 | platform_device_unregister(glue->usb3_phy); | 201 | platform_device_unregister(glue->usb3_phy); |
201 | platform_device_unregister(glue->dwc3); | ||
202 | pci_set_drvdata(pci, NULL); | 202 | pci_set_drvdata(pci, NULL); |
203 | pci_disable_device(pci); | 203 | pci_disable_device(pci); |
204 | } | 204 | } |
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 2b6e7e001207..b5e5b35df49c 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c | |||
@@ -1706,11 +1706,19 @@ static void dwc3_gadget_free_endpoints(struct dwc3 *dwc) | |||
1706 | dep = dwc->eps[epnum]; | 1706 | dep = dwc->eps[epnum]; |
1707 | if (!dep) | 1707 | if (!dep) |
1708 | continue; | 1708 | continue; |
1709 | 1709 | /* | |
1710 | dwc3_free_trb_pool(dep); | 1710 | * Physical endpoints 0 and 1 are special; they form the |
1711 | 1711 | * bi-directional USB endpoint 0. | |
1712 | if (epnum != 0 && epnum != 1) | 1712 | * |
1713 | * For those two physical endpoints, we don't allocate a TRB | ||
1714 | * pool nor do we add them the endpoints list. Due to that, we | ||
1715 | * shouldn't do these two operations otherwise we would end up | ||
1716 | * with all sorts of bugs when removing dwc3.ko. | ||
1717 | */ | ||
1718 | if (epnum != 0 && epnum != 1) { | ||
1719 | dwc3_free_trb_pool(dep); | ||
1713 | list_del(&dep->endpoint.ep_list); | 1720 | list_del(&dep->endpoint.ep_list); |
1721 | } | ||
1714 | 1722 | ||
1715 | kfree(dep); | 1723 | kfree(dep); |
1716 | } | 1724 | } |
diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c index acff5b8f6e89..f80d0330d548 100644 --- a/drivers/usb/host/ehci-sched.c +++ b/drivers/usb/host/ehci-sched.c | |||
@@ -213,7 +213,7 @@ static inline unsigned char tt_start_uframe(struct ehci_hcd *ehci, __hc32 mask) | |||
213 | } | 213 | } |
214 | 214 | ||
215 | static const unsigned char | 215 | static const unsigned char |
216 | max_tt_usecs[] = { 125, 125, 125, 125, 125, 125, 125, 25 }; | 216 | max_tt_usecs[] = { 125, 125, 125, 125, 125, 125, 30, 0 }; |
217 | 217 | ||
218 | /* carryover low/fullspeed bandwidth that crosses uframe boundries */ | 218 | /* carryover low/fullspeed bandwidth that crosses uframe boundries */ |
219 | static inline void carryover_tt_bandwidth(unsigned short tt_usecs[8]) | 219 | static inline void carryover_tt_bandwidth(unsigned short tt_usecs[8]) |
@@ -646,6 +646,10 @@ static void end_unlink_intr(struct ehci_hcd *ehci, struct ehci_qh *qh) | |||
646 | /* reschedule QH iff another request is queued */ | 646 | /* reschedule QH iff another request is queued */ |
647 | if (!list_empty(&qh->qtd_list) && ehci->rh_state == EHCI_RH_RUNNING) { | 647 | if (!list_empty(&qh->qtd_list) && ehci->rh_state == EHCI_RH_RUNNING) { |
648 | rc = qh_schedule(ehci, qh); | 648 | rc = qh_schedule(ehci, qh); |
649 | if (rc == 0) { | ||
650 | qh_refresh(ehci, qh); | ||
651 | qh_link_periodic(ehci, qh); | ||
652 | } | ||
649 | 653 | ||
650 | /* An error here likely indicates handshake failure | 654 | /* An error here likely indicates handshake failure |
651 | * or no space left in the schedule. Neither fault | 655 | * or no space left in the schedule. Neither fault |
@@ -653,9 +657,10 @@ static void end_unlink_intr(struct ehci_hcd *ehci, struct ehci_qh *qh) | |||
653 | * | 657 | * |
654 | * FIXME kill the now-dysfunctional queued urbs | 658 | * FIXME kill the now-dysfunctional queued urbs |
655 | */ | 659 | */ |
656 | if (rc != 0) | 660 | else { |
657 | ehci_err(ehci, "can't reschedule qh %p, err %d\n", | 661 | ehci_err(ehci, "can't reschedule qh %p, err %d\n", |
658 | qh, rc); | 662 | qh, rc); |
663 | } | ||
659 | } | 664 | } |
660 | 665 | ||
661 | /* maybe turn off periodic schedule */ | 666 | /* maybe turn off periodic schedule */ |
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index 2cfc465925bd..fbf75e57628b 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c | |||
@@ -1827,6 +1827,9 @@ void xhci_mem_cleanup(struct xhci_hcd *xhci) | |||
1827 | } | 1827 | } |
1828 | spin_unlock_irqrestore(&xhci->lock, flags); | 1828 | spin_unlock_irqrestore(&xhci->lock, flags); |
1829 | 1829 | ||
1830 | if (!xhci->rh_bw) | ||
1831 | goto no_bw; | ||
1832 | |||
1830 | num_ports = HCS_MAX_PORTS(xhci->hcs_params1); | 1833 | num_ports = HCS_MAX_PORTS(xhci->hcs_params1); |
1831 | for (i = 0; i < num_ports; i++) { | 1834 | for (i = 0; i < num_ports; i++) { |
1832 | struct xhci_interval_bw_table *bwt = &xhci->rh_bw[i].bw_table; | 1835 | struct xhci_interval_bw_table *bwt = &xhci->rh_bw[i].bw_table; |
@@ -1845,6 +1848,7 @@ void xhci_mem_cleanup(struct xhci_hcd *xhci) | |||
1845 | } | 1848 | } |
1846 | } | 1849 | } |
1847 | 1850 | ||
1851 | no_bw: | ||
1848 | xhci->num_usb2_ports = 0; | 1852 | xhci->num_usb2_ports = 0; |
1849 | xhci->num_usb3_ports = 0; | 1853 | xhci->num_usb3_ports = 0; |
1850 | xhci->num_active_eps = 0; | 1854 | xhci->num_active_eps = 0; |
@@ -2256,6 +2260,9 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags) | |||
2256 | u32 page_size, temp; | 2260 | u32 page_size, temp; |
2257 | int i; | 2261 | int i; |
2258 | 2262 | ||
2263 | INIT_LIST_HEAD(&xhci->lpm_failed_devs); | ||
2264 | INIT_LIST_HEAD(&xhci->cancel_cmd_list); | ||
2265 | |||
2259 | page_size = xhci_readl(xhci, &xhci->op_regs->page_size); | 2266 | page_size = xhci_readl(xhci, &xhci->op_regs->page_size); |
2260 | xhci_dbg(xhci, "Supported page size register = 0x%x\n", page_size); | 2267 | xhci_dbg(xhci, "Supported page size register = 0x%x\n", page_size); |
2261 | for (i = 0; i < 16; i++) { | 2268 | for (i = 0; i < 16; i++) { |
@@ -2334,7 +2341,6 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags) | |||
2334 | xhci->cmd_ring = xhci_ring_alloc(xhci, 1, 1, TYPE_COMMAND, flags); | 2341 | xhci->cmd_ring = xhci_ring_alloc(xhci, 1, 1, TYPE_COMMAND, flags); |
2335 | if (!xhci->cmd_ring) | 2342 | if (!xhci->cmd_ring) |
2336 | goto fail; | 2343 | goto fail; |
2337 | INIT_LIST_HEAD(&xhci->cancel_cmd_list); | ||
2338 | xhci_dbg(xhci, "Allocated command ring at %p\n", xhci->cmd_ring); | 2344 | xhci_dbg(xhci, "Allocated command ring at %p\n", xhci->cmd_ring); |
2339 | xhci_dbg(xhci, "First segment DMA is 0x%llx\n", | 2345 | xhci_dbg(xhci, "First segment DMA is 0x%llx\n", |
2340 | (unsigned long long)xhci->cmd_ring->first_seg->dma); | 2346 | (unsigned long long)xhci->cmd_ring->first_seg->dma); |
@@ -2445,8 +2451,6 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags) | |||
2445 | if (xhci_setup_port_arrays(xhci, flags)) | 2451 | if (xhci_setup_port_arrays(xhci, flags)) |
2446 | goto fail; | 2452 | goto fail; |
2447 | 2453 | ||
2448 | INIT_LIST_HEAD(&xhci->lpm_failed_devs); | ||
2449 | |||
2450 | /* Enable USB 3.0 device notifications for function remote wake, which | 2454 | /* Enable USB 3.0 device notifications for function remote wake, which |
2451 | * is necessary for allowing USB 3.0 devices to do remote wakeup from | 2455 | * is necessary for allowing USB 3.0 devices to do remote wakeup from |
2452 | * U3 (device suspend). | 2456 | * U3 (device suspend). |
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index 1a30c380043c..cc24e39b97d5 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c | |||
@@ -221,6 +221,14 @@ static void xhci_pci_remove(struct pci_dev *dev) | |||
221 | static int xhci_pci_suspend(struct usb_hcd *hcd, bool do_wakeup) | 221 | static int xhci_pci_suspend(struct usb_hcd *hcd, bool do_wakeup) |
222 | { | 222 | { |
223 | struct xhci_hcd *xhci = hcd_to_xhci(hcd); | 223 | struct xhci_hcd *xhci = hcd_to_xhci(hcd); |
224 | struct pci_dev *pdev = to_pci_dev(hcd->self.controller); | ||
225 | |||
226 | /* | ||
227 | * Systems with the TI redriver that loses port status change events | ||
228 | * need to have the registers polled during D3, so avoid D3cold. | ||
229 | */ | ||
230 | if (xhci_compliance_mode_recovery_timer_quirk_check()) | ||
231 | pdev->no_d3cold = true; | ||
224 | 232 | ||
225 | return xhci_suspend(xhci); | 233 | return xhci_suspend(xhci); |
226 | } | 234 | } |
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index b4aa79d154b2..d8f640b12dd9 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c | |||
@@ -466,7 +466,7 @@ static void compliance_mode_recovery_timer_init(struct xhci_hcd *xhci) | |||
466 | * Systems: | 466 | * Systems: |
467 | * Vendor: Hewlett-Packard -> System Models: Z420, Z620 and Z820 | 467 | * Vendor: Hewlett-Packard -> System Models: Z420, Z620 and Z820 |
468 | */ | 468 | */ |
469 | static bool compliance_mode_recovery_timer_quirk_check(void) | 469 | bool xhci_compliance_mode_recovery_timer_quirk_check(void) |
470 | { | 470 | { |
471 | const char *dmi_product_name, *dmi_sys_vendor; | 471 | const char *dmi_product_name, *dmi_sys_vendor; |
472 | 472 | ||
@@ -517,7 +517,7 @@ int xhci_init(struct usb_hcd *hcd) | |||
517 | xhci_dbg(xhci, "Finished xhci_init\n"); | 517 | xhci_dbg(xhci, "Finished xhci_init\n"); |
518 | 518 | ||
519 | /* Initializing Compliance Mode Recovery Data If Needed */ | 519 | /* Initializing Compliance Mode Recovery Data If Needed */ |
520 | if (compliance_mode_recovery_timer_quirk_check()) { | 520 | if (xhci_compliance_mode_recovery_timer_quirk_check()) { |
521 | xhci->quirks |= XHCI_COMP_MODE_QUIRK; | 521 | xhci->quirks |= XHCI_COMP_MODE_QUIRK; |
522 | compliance_mode_recovery_timer_init(xhci); | 522 | compliance_mode_recovery_timer_init(xhci); |
523 | } | 523 | } |
@@ -956,6 +956,7 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated) | |||
956 | struct usb_hcd *hcd = xhci_to_hcd(xhci); | 956 | struct usb_hcd *hcd = xhci_to_hcd(xhci); |
957 | struct usb_hcd *secondary_hcd; | 957 | struct usb_hcd *secondary_hcd; |
958 | int retval = 0; | 958 | int retval = 0; |
959 | bool comp_timer_running = false; | ||
959 | 960 | ||
960 | /* Wait a bit if either of the roothubs need to settle from the | 961 | /* Wait a bit if either of the roothubs need to settle from the |
961 | * transition into bus suspend. | 962 | * transition into bus suspend. |
@@ -993,6 +994,13 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated) | |||
993 | 994 | ||
994 | /* If restore operation fails, re-initialize the HC during resume */ | 995 | /* If restore operation fails, re-initialize the HC during resume */ |
995 | if ((temp & STS_SRE) || hibernated) { | 996 | if ((temp & STS_SRE) || hibernated) { |
997 | |||
998 | if ((xhci->quirks & XHCI_COMP_MODE_QUIRK) && | ||
999 | !(xhci_all_ports_seen_u0(xhci))) { | ||
1000 | del_timer_sync(&xhci->comp_mode_recovery_timer); | ||
1001 | xhci_dbg(xhci, "Compliance Mode Recovery Timer deleted!\n"); | ||
1002 | } | ||
1003 | |||
996 | /* Let the USB core know _both_ roothubs lost power. */ | 1004 | /* Let the USB core know _both_ roothubs lost power. */ |
997 | usb_root_hub_lost_power(xhci->main_hcd->self.root_hub); | 1005 | usb_root_hub_lost_power(xhci->main_hcd->self.root_hub); |
998 | usb_root_hub_lost_power(xhci->shared_hcd->self.root_hub); | 1006 | usb_root_hub_lost_power(xhci->shared_hcd->self.root_hub); |
@@ -1035,6 +1043,8 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated) | |||
1035 | retval = xhci_init(hcd->primary_hcd); | 1043 | retval = xhci_init(hcd->primary_hcd); |
1036 | if (retval) | 1044 | if (retval) |
1037 | return retval; | 1045 | return retval; |
1046 | comp_timer_running = true; | ||
1047 | |||
1038 | xhci_dbg(xhci, "Start the primary HCD\n"); | 1048 | xhci_dbg(xhci, "Start the primary HCD\n"); |
1039 | retval = xhci_run(hcd->primary_hcd); | 1049 | retval = xhci_run(hcd->primary_hcd); |
1040 | if (!retval) { | 1050 | if (!retval) { |
@@ -1076,7 +1086,7 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated) | |||
1076 | * to suffer the Compliance Mode issue again. It doesn't matter if | 1086 | * to suffer the Compliance Mode issue again. It doesn't matter if |
1077 | * ports have entered previously to U0 before system's suspension. | 1087 | * ports have entered previously to U0 before system's suspension. |
1078 | */ | 1088 | */ |
1079 | if (xhci->quirks & XHCI_COMP_MODE_QUIRK) | 1089 | if ((xhci->quirks & XHCI_COMP_MODE_QUIRK) && !comp_timer_running) |
1080 | compliance_mode_recovery_timer_init(xhci); | 1090 | compliance_mode_recovery_timer_init(xhci); |
1081 | 1091 | ||
1082 | /* Re-enable port polling. */ | 1092 | /* Re-enable port polling. */ |
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index 29c978e37135..77600cefcaf1 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h | |||
@@ -1853,4 +1853,7 @@ struct xhci_input_control_ctx *xhci_get_input_control_ctx(struct xhci_hcd *xhci, | |||
1853 | struct xhci_slot_ctx *xhci_get_slot_ctx(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx); | 1853 | struct xhci_slot_ctx *xhci_get_slot_ctx(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx); |
1854 | struct xhci_ep_ctx *xhci_get_ep_ctx(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx, unsigned int ep_index); | 1854 | struct xhci_ep_ctx *xhci_get_ep_ctx(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx, unsigned int ep_index); |
1855 | 1855 | ||
1856 | /* xHCI quirks */ | ||
1857 | bool xhci_compliance_mode_recovery_timer_quirk_check(void); | ||
1858 | |||
1856 | #endif /* __LINUX_XHCI_HCD_H */ | 1859 | #endif /* __LINUX_XHCI_HCD_H */ |
diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index 8914dec49f01..9d3044bdebe5 100644 --- a/drivers/usb/musb/musb_host.c +++ b/drivers/usb/musb/musb_host.c | |||
@@ -1232,7 +1232,6 @@ void musb_host_tx(struct musb *musb, u8 epnum) | |||
1232 | void __iomem *mbase = musb->mregs; | 1232 | void __iomem *mbase = musb->mregs; |
1233 | struct dma_channel *dma; | 1233 | struct dma_channel *dma; |
1234 | bool transfer_pending = false; | 1234 | bool transfer_pending = false; |
1235 | static bool use_sg; | ||
1236 | 1235 | ||
1237 | musb_ep_select(mbase, epnum); | 1236 | musb_ep_select(mbase, epnum); |
1238 | tx_csr = musb_readw(epio, MUSB_TXCSR); | 1237 | tx_csr = musb_readw(epio, MUSB_TXCSR); |
@@ -1463,9 +1462,9 @@ done: | |||
1463 | * NULL. | 1462 | * NULL. |
1464 | */ | 1463 | */ |
1465 | if (!urb->transfer_buffer) | 1464 | if (!urb->transfer_buffer) |
1466 | use_sg = true; | 1465 | qh->use_sg = true; |
1467 | 1466 | ||
1468 | if (use_sg) { | 1467 | if (qh->use_sg) { |
1469 | /* sg_miter_start is already done in musb_ep_program */ | 1468 | /* sg_miter_start is already done in musb_ep_program */ |
1470 | if (!sg_miter_next(&qh->sg_miter)) { | 1469 | if (!sg_miter_next(&qh->sg_miter)) { |
1471 | dev_err(musb->controller, "error: sg list empty\n"); | 1470 | dev_err(musb->controller, "error: sg list empty\n"); |
@@ -1484,9 +1483,9 @@ done: | |||
1484 | 1483 | ||
1485 | qh->segsize = length; | 1484 | qh->segsize = length; |
1486 | 1485 | ||
1487 | if (use_sg) { | 1486 | if (qh->use_sg) { |
1488 | if (offset + length >= urb->transfer_buffer_length) | 1487 | if (offset + length >= urb->transfer_buffer_length) |
1489 | use_sg = false; | 1488 | qh->use_sg = false; |
1490 | } | 1489 | } |
1491 | 1490 | ||
1492 | musb_ep_select(mbase, epnum); | 1491 | musb_ep_select(mbase, epnum); |
@@ -1552,7 +1551,6 @@ void musb_host_rx(struct musb *musb, u8 epnum) | |||
1552 | bool done = false; | 1551 | bool done = false; |
1553 | u32 status; | 1552 | u32 status; |
1554 | struct dma_channel *dma; | 1553 | struct dma_channel *dma; |
1555 | static bool use_sg; | ||
1556 | unsigned int sg_flags = SG_MITER_ATOMIC | SG_MITER_TO_SG; | 1554 | unsigned int sg_flags = SG_MITER_ATOMIC | SG_MITER_TO_SG; |
1557 | 1555 | ||
1558 | musb_ep_select(mbase, epnum); | 1556 | musb_ep_select(mbase, epnum); |
@@ -1878,12 +1876,12 @@ void musb_host_rx(struct musb *musb, u8 epnum) | |||
1878 | * NULL. | 1876 | * NULL. |
1879 | */ | 1877 | */ |
1880 | if (!urb->transfer_buffer) { | 1878 | if (!urb->transfer_buffer) { |
1881 | use_sg = true; | 1879 | qh->use_sg = true; |
1882 | sg_miter_start(&qh->sg_miter, urb->sg, 1, | 1880 | sg_miter_start(&qh->sg_miter, urb->sg, 1, |
1883 | sg_flags); | 1881 | sg_flags); |
1884 | } | 1882 | } |
1885 | 1883 | ||
1886 | if (use_sg) { | 1884 | if (qh->use_sg) { |
1887 | if (!sg_miter_next(&qh->sg_miter)) { | 1885 | if (!sg_miter_next(&qh->sg_miter)) { |
1888 | dev_err(musb->controller, "error: sg list empty\n"); | 1886 | dev_err(musb->controller, "error: sg list empty\n"); |
1889 | sg_miter_stop(&qh->sg_miter); | 1887 | sg_miter_stop(&qh->sg_miter); |
@@ -1913,8 +1911,8 @@ finish: | |||
1913 | urb->actual_length += xfer_len; | 1911 | urb->actual_length += xfer_len; |
1914 | qh->offset += xfer_len; | 1912 | qh->offset += xfer_len; |
1915 | if (done) { | 1913 | if (done) { |
1916 | if (use_sg) | 1914 | if (qh->use_sg) |
1917 | use_sg = false; | 1915 | qh->use_sg = false; |
1918 | 1916 | ||
1919 | if (urb->status == -EINPROGRESS) | 1917 | if (urb->status == -EINPROGRESS) |
1920 | urb->status = status; | 1918 | urb->status = status; |
diff --git a/drivers/usb/musb/musb_host.h b/drivers/usb/musb/musb_host.h index 5a9c8feec10c..738f7eb60df9 100644 --- a/drivers/usb/musb/musb_host.h +++ b/drivers/usb/musb/musb_host.h | |||
@@ -74,6 +74,7 @@ struct musb_qh { | |||
74 | u16 frame; /* for periodic schedule */ | 74 | u16 frame; /* for periodic schedule */ |
75 | unsigned iso_idx; /* in urb->iso_frame_desc[] */ | 75 | unsigned iso_idx; /* in urb->iso_frame_desc[] */ |
76 | struct sg_mapping_iter sg_miter; /* for highmem in PIO mode */ | 76 | struct sg_mapping_iter sg_miter; /* for highmem in PIO mode */ |
77 | bool use_sg; /* to track urb using sglist */ | ||
77 | }; | 78 | }; |
78 | 79 | ||
79 | /* map from control or bulk queue head to the first qh on that ring */ | 80 | /* map from control or bulk queue head to the first qh on that ring */ |
diff --git a/drivers/usb/phy/Kconfig b/drivers/usb/phy/Kconfig index 7ef3eb8617a6..2311b1e4e43c 100644 --- a/drivers/usb/phy/Kconfig +++ b/drivers/usb/phy/Kconfig | |||
@@ -4,11 +4,17 @@ | |||
4 | menuconfig USB_PHY | 4 | menuconfig USB_PHY |
5 | bool "USB Physical Layer drivers" | 5 | bool "USB Physical Layer drivers" |
6 | help | 6 | help |
7 | USB controllers (those which are host, device or DRD) need a | 7 | Most USB controllers have the physical layer signalling part |
8 | device to handle the physical layer signalling, commonly called | 8 | (commonly called a PHY) built in. However, dual-role devices |
9 | a PHY. | 9 | (a.k.a. USB on-the-go) which support being USB master or slave |
10 | with the same connector often use an external PHY. | ||
10 | 11 | ||
11 | The following drivers add support for such PHY devices. | 12 | The drivers in this submenu add support for such PHY devices. |
13 | They are not needed for standard master-only (or the vast | ||
14 | majority of slave-only) USB interfaces. | ||
15 | |||
16 | If you're not sure if this applies to you, it probably doesn't; | ||
17 | say N here. | ||
12 | 18 | ||
13 | if USB_PHY | 19 | if USB_PHY |
14 | 20 | ||
diff --git a/drivers/usb/serial/ark3116.c b/drivers/usb/serial/ark3116.c index 3b16118cbf62..40e7fd94646f 100644 --- a/drivers/usb/serial/ark3116.c +++ b/drivers/usb/serial/ark3116.c | |||
@@ -43,7 +43,7 @@ | |||
43 | #define DRIVER_NAME "ark3116" | 43 | #define DRIVER_NAME "ark3116" |
44 | 44 | ||
45 | /* usb timeout of 1 second */ | 45 | /* usb timeout of 1 second */ |
46 | #define ARK_TIMEOUT (1*HZ) | 46 | #define ARK_TIMEOUT 1000 |
47 | 47 | ||
48 | static const struct usb_device_id id_table[] = { | 48 | static const struct usb_device_id id_table[] = { |
49 | { USB_DEVICE(0x6547, 0x0232) }, | 49 | { USB_DEVICE(0x6547, 0x0232) }, |
diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c index d341555d37d8..082120198f87 100644 --- a/drivers/usb/serial/cypress_m8.c +++ b/drivers/usb/serial/cypress_m8.c | |||
@@ -65,6 +65,7 @@ static const struct usb_device_id id_table_earthmate[] = { | |||
65 | static const struct usb_device_id id_table_cyphidcomrs232[] = { | 65 | static const struct usb_device_id id_table_cyphidcomrs232[] = { |
66 | { USB_DEVICE(VENDOR_ID_CYPRESS, PRODUCT_ID_CYPHIDCOM) }, | 66 | { USB_DEVICE(VENDOR_ID_CYPRESS, PRODUCT_ID_CYPHIDCOM) }, |
67 | { USB_DEVICE(VENDOR_ID_POWERCOM, PRODUCT_ID_UPS) }, | 67 | { USB_DEVICE(VENDOR_ID_POWERCOM, PRODUCT_ID_UPS) }, |
68 | { USB_DEVICE(VENDOR_ID_FRWD, PRODUCT_ID_CYPHIDCOM_FRWD) }, | ||
68 | { } /* Terminating entry */ | 69 | { } /* Terminating entry */ |
69 | }; | 70 | }; |
70 | 71 | ||
@@ -78,6 +79,7 @@ static const struct usb_device_id id_table_combined[] = { | |||
78 | { USB_DEVICE(VENDOR_ID_DELORME, PRODUCT_ID_EARTHMATEUSB_LT20) }, | 79 | { USB_DEVICE(VENDOR_ID_DELORME, PRODUCT_ID_EARTHMATEUSB_LT20) }, |
79 | { USB_DEVICE(VENDOR_ID_CYPRESS, PRODUCT_ID_CYPHIDCOM) }, | 80 | { USB_DEVICE(VENDOR_ID_CYPRESS, PRODUCT_ID_CYPHIDCOM) }, |
80 | { USB_DEVICE(VENDOR_ID_POWERCOM, PRODUCT_ID_UPS) }, | 81 | { USB_DEVICE(VENDOR_ID_POWERCOM, PRODUCT_ID_UPS) }, |
82 | { USB_DEVICE(VENDOR_ID_FRWD, PRODUCT_ID_CYPHIDCOM_FRWD) }, | ||
81 | { USB_DEVICE(VENDOR_ID_DAZZLE, PRODUCT_ID_CA42) }, | 83 | { USB_DEVICE(VENDOR_ID_DAZZLE, PRODUCT_ID_CA42) }, |
82 | { } /* Terminating entry */ | 84 | { } /* Terminating entry */ |
83 | }; | 85 | }; |
@@ -229,6 +231,12 @@ static struct usb_serial_driver * const serial_drivers[] = { | |||
229 | * Cypress serial helper functions | 231 | * Cypress serial helper functions |
230 | *****************************************************************************/ | 232 | *****************************************************************************/ |
231 | 233 | ||
234 | /* FRWD Dongle hidcom needs to skip reset and speed checks */ | ||
235 | static inline bool is_frwd(struct usb_device *dev) | ||
236 | { | ||
237 | return ((le16_to_cpu(dev->descriptor.idVendor) == VENDOR_ID_FRWD) && | ||
238 | (le16_to_cpu(dev->descriptor.idProduct) == PRODUCT_ID_CYPHIDCOM_FRWD)); | ||
239 | } | ||
232 | 240 | ||
233 | static int analyze_baud_rate(struct usb_serial_port *port, speed_t new_rate) | 241 | static int analyze_baud_rate(struct usb_serial_port *port, speed_t new_rate) |
234 | { | 242 | { |
@@ -238,6 +246,10 @@ static int analyze_baud_rate(struct usb_serial_port *port, speed_t new_rate) | |||
238 | if (unstable_bauds) | 246 | if (unstable_bauds) |
239 | return new_rate; | 247 | return new_rate; |
240 | 248 | ||
249 | /* FRWD Dongle uses 115200 bps */ | ||
250 | if (is_frwd(port->serial->dev)) | ||
251 | return new_rate; | ||
252 | |||
241 | /* | 253 | /* |
242 | * The general purpose firmware for the Cypress M8 allows for | 254 | * The general purpose firmware for the Cypress M8 allows for |
243 | * a maximum speed of 57600bps (I have no idea whether DeLorme | 255 | * a maximum speed of 57600bps (I have no idea whether DeLorme |
@@ -448,7 +460,11 @@ static int cypress_generic_port_probe(struct usb_serial_port *port) | |||
448 | return -ENOMEM; | 460 | return -ENOMEM; |
449 | } | 461 | } |
450 | 462 | ||
451 | usb_reset_configuration(serial->dev); | 463 | /* Skip reset for FRWD device. It is a workaound: |
464 | device hangs if it receives SET_CONFIGURE in Configured | ||
465 | state. */ | ||
466 | if (!is_frwd(serial->dev)) | ||
467 | usb_reset_configuration(serial->dev); | ||
452 | 468 | ||
453 | priv->cmd_ctrl = 0; | 469 | priv->cmd_ctrl = 0; |
454 | priv->line_control = 0; | 470 | priv->line_control = 0; |
diff --git a/drivers/usb/serial/cypress_m8.h b/drivers/usb/serial/cypress_m8.h index 67cf60826884..b461311a2ae7 100644 --- a/drivers/usb/serial/cypress_m8.h +++ b/drivers/usb/serial/cypress_m8.h | |||
@@ -24,6 +24,10 @@ | |||
24 | #define VENDOR_ID_CYPRESS 0x04b4 | 24 | #define VENDOR_ID_CYPRESS 0x04b4 |
25 | #define PRODUCT_ID_CYPHIDCOM 0x5500 | 25 | #define PRODUCT_ID_CYPHIDCOM 0x5500 |
26 | 26 | ||
27 | /* FRWD Dongle - a GPS sports watch */ | ||
28 | #define VENDOR_ID_FRWD 0x6737 | ||
29 | #define PRODUCT_ID_CYPHIDCOM_FRWD 0x0001 | ||
30 | |||
27 | /* Powercom UPS, chip CY7C63723 */ | 31 | /* Powercom UPS, chip CY7C63723 */ |
28 | #define VENDOR_ID_POWERCOM 0x0d9f | 32 | #define VENDOR_ID_POWERCOM 0x0d9f |
29 | #define PRODUCT_ID_UPS 0x0002 | 33 | #define PRODUCT_ID_UPS 0x0002 |
diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c index 090b411d893f..7d8dd5aad236 100644 --- a/drivers/usb/serial/f81232.c +++ b/drivers/usb/serial/f81232.c | |||
@@ -165,11 +165,12 @@ static void f81232_set_termios(struct tty_struct *tty, | |||
165 | /* FIXME - Stubbed out for now */ | 165 | /* FIXME - Stubbed out for now */ |
166 | 166 | ||
167 | /* Don't change anything if nothing has changed */ | 167 | /* Don't change anything if nothing has changed */ |
168 | if (!tty_termios_hw_change(&tty->termios, old_termios)) | 168 | if (old_termios && !tty_termios_hw_change(&tty->termios, old_termios)) |
169 | return; | 169 | return; |
170 | 170 | ||
171 | /* Do the real work here... */ | 171 | /* Do the real work here... */ |
172 | tty_termios_copy_hw(&tty->termios, old_termios); | 172 | if (old_termios) |
173 | tty_termios_copy_hw(&tty->termios, old_termios); | ||
173 | } | 174 | } |
174 | 175 | ||
175 | static int f81232_tiocmget(struct tty_struct *tty) | 176 | static int f81232_tiocmget(struct tty_struct *tty) |
@@ -187,12 +188,11 @@ static int f81232_tiocmset(struct tty_struct *tty, | |||
187 | 188 | ||
188 | static int f81232_open(struct tty_struct *tty, struct usb_serial_port *port) | 189 | static int f81232_open(struct tty_struct *tty, struct usb_serial_port *port) |
189 | { | 190 | { |
190 | struct ktermios tmp_termios; | ||
191 | int result; | 191 | int result; |
192 | 192 | ||
193 | /* Setup termios */ | 193 | /* Setup termios */ |
194 | if (tty) | 194 | if (tty) |
195 | f81232_set_termios(tty, port, &tmp_termios); | 195 | f81232_set_termios(tty, port, NULL); |
196 | 196 | ||
197 | result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); | 197 | result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); |
198 | if (result) { | 198 | if (result) { |
diff --git a/drivers/usb/serial/iuu_phoenix.c b/drivers/usb/serial/iuu_phoenix.c index 9d74c278b7b5..790673e5faa7 100644 --- a/drivers/usb/serial/iuu_phoenix.c +++ b/drivers/usb/serial/iuu_phoenix.c | |||
@@ -287,7 +287,7 @@ static int bulk_immediate(struct usb_serial_port *port, u8 *buf, u8 count) | |||
287 | usb_bulk_msg(serial->dev, | 287 | usb_bulk_msg(serial->dev, |
288 | usb_sndbulkpipe(serial->dev, | 288 | usb_sndbulkpipe(serial->dev, |
289 | port->bulk_out_endpointAddress), buf, | 289 | port->bulk_out_endpointAddress), buf, |
290 | count, &actual, HZ * 1); | 290 | count, &actual, 1000); |
291 | 291 | ||
292 | if (status != IUU_OPERATION_OK) | 292 | if (status != IUU_OPERATION_OK) |
293 | dev_dbg(&port->dev, "%s - error = %2x\n", __func__, status); | 293 | dev_dbg(&port->dev, "%s - error = %2x\n", __func__, status); |
@@ -307,7 +307,7 @@ static int read_immediate(struct usb_serial_port *port, u8 *buf, u8 count) | |||
307 | usb_bulk_msg(serial->dev, | 307 | usb_bulk_msg(serial->dev, |
308 | usb_rcvbulkpipe(serial->dev, | 308 | usb_rcvbulkpipe(serial->dev, |
309 | port->bulk_in_endpointAddress), buf, | 309 | port->bulk_in_endpointAddress), buf, |
310 | count, &actual, HZ * 1); | 310 | count, &actual, 1000); |
311 | 311 | ||
312 | if (status != IUU_OPERATION_OK) | 312 | if (status != IUU_OPERATION_OK) |
313 | dev_dbg(&port->dev, "%s - error = %2x\n", __func__, status); | 313 | dev_dbg(&port->dev, "%s - error = %2x\n", __func__, status); |
diff --git a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c index eb30d7b01f36..3549d073df22 100644 --- a/drivers/usb/serial/keyspan.c +++ b/drivers/usb/serial/keyspan.c | |||
@@ -1548,7 +1548,6 @@ static int keyspan_usa26_send_setup(struct usb_serial *serial, | |||
1548 | struct keyspan_serial_private *s_priv; | 1548 | struct keyspan_serial_private *s_priv; |
1549 | struct keyspan_port_private *p_priv; | 1549 | struct keyspan_port_private *p_priv; |
1550 | const struct keyspan_device_details *d_details; | 1550 | const struct keyspan_device_details *d_details; |
1551 | int outcont_urb; | ||
1552 | struct urb *this_urb; | 1551 | struct urb *this_urb; |
1553 | int device_port, err; | 1552 | int device_port, err; |
1554 | 1553 | ||
@@ -1559,7 +1558,6 @@ static int keyspan_usa26_send_setup(struct usb_serial *serial, | |||
1559 | d_details = s_priv->device_details; | 1558 | d_details = s_priv->device_details; |
1560 | device_port = port->number - port->serial->minor; | 1559 | device_port = port->number - port->serial->minor; |
1561 | 1560 | ||
1562 | outcont_urb = d_details->outcont_endpoints[port->number]; | ||
1563 | this_urb = p_priv->outcont_urb; | 1561 | this_urb = p_priv->outcont_urb; |
1564 | 1562 | ||
1565 | dev_dbg(&port->dev, "%s - endpoint %d\n", __func__, usb_pipeendpoint(this_urb->pipe)); | 1563 | dev_dbg(&port->dev, "%s - endpoint %d\n", __func__, usb_pipeendpoint(this_urb->pipe)); |
@@ -1685,14 +1683,6 @@ static int keyspan_usa26_send_setup(struct usb_serial *serial, | |||
1685 | err = usb_submit_urb(this_urb, GFP_ATOMIC); | 1683 | err = usb_submit_urb(this_urb, GFP_ATOMIC); |
1686 | if (err != 0) | 1684 | if (err != 0) |
1687 | dev_dbg(&port->dev, "%s - usb_submit_urb(setup) failed (%d)\n", __func__, err); | 1685 | dev_dbg(&port->dev, "%s - usb_submit_urb(setup) failed (%d)\n", __func__, err); |
1688 | #if 0 | ||
1689 | else { | ||
1690 | dev_dbg(&port->dev, "%s - usb_submit_urb(%d) OK %d bytes (end %d)\n", __func__ | ||
1691 | outcont_urb, this_urb->transfer_buffer_length, | ||
1692 | usb_pipeendpoint(this_urb->pipe)); | ||
1693 | } | ||
1694 | #endif | ||
1695 | |||
1696 | return 0; | 1686 | return 0; |
1697 | } | 1687 | } |
1698 | 1688 | ||
diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c index cc0e54345df9..f27c621a9297 100644 --- a/drivers/usb/serial/mos7720.c +++ b/drivers/usb/serial/mos7720.c | |||
@@ -40,7 +40,7 @@ | |||
40 | #define DRIVER_DESC "Moschip USB Serial Driver" | 40 | #define DRIVER_DESC "Moschip USB Serial Driver" |
41 | 41 | ||
42 | /* default urb timeout */ | 42 | /* default urb timeout */ |
43 | #define MOS_WDR_TIMEOUT (HZ * 5) | 43 | #define MOS_WDR_TIMEOUT 5000 |
44 | 44 | ||
45 | #define MOS_MAX_PORT 0x02 | 45 | #define MOS_MAX_PORT 0x02 |
46 | #define MOS_WRITE 0x0E | 46 | #define MOS_WRITE 0x0E |
@@ -227,11 +227,22 @@ static int read_mos_reg(struct usb_serial *serial, unsigned int serial_portnum, | |||
227 | __u8 requesttype = (__u8)0xc0; | 227 | __u8 requesttype = (__u8)0xc0; |
228 | __u16 index = get_reg_index(reg); | 228 | __u16 index = get_reg_index(reg); |
229 | __u16 value = get_reg_value(reg, serial_portnum); | 229 | __u16 value = get_reg_value(reg, serial_portnum); |
230 | int status = usb_control_msg(usbdev, pipe, request, requesttype, value, | 230 | u8 *buf; |
231 | index, data, 1, MOS_WDR_TIMEOUT); | 231 | int status; |
232 | if (status < 0) | 232 | |
233 | buf = kmalloc(1, GFP_KERNEL); | ||
234 | if (!buf) | ||
235 | return -ENOMEM; | ||
236 | |||
237 | status = usb_control_msg(usbdev, pipe, request, requesttype, value, | ||
238 | index, buf, 1, MOS_WDR_TIMEOUT); | ||
239 | if (status == 1) | ||
240 | *data = *buf; | ||
241 | else if (status < 0) | ||
233 | dev_err(&usbdev->dev, | 242 | dev_err(&usbdev->dev, |
234 | "mos7720: usb_control_msg() failed: %d", status); | 243 | "mos7720: usb_control_msg() failed: %d", status); |
244 | kfree(buf); | ||
245 | |||
235 | return status; | 246 | return status; |
236 | } | 247 | } |
237 | 248 | ||
@@ -1618,7 +1629,7 @@ static void change_port_settings(struct tty_struct *tty, | |||
1618 | mos7720_port->shadowMCR |= (UART_MCR_XONANY); | 1629 | mos7720_port->shadowMCR |= (UART_MCR_XONANY); |
1619 | /* To set hardware flow control to the specified * | 1630 | /* To set hardware flow control to the specified * |
1620 | * serial port, in SP1/2_CONTROL_REG */ | 1631 | * serial port, in SP1/2_CONTROL_REG */ |
1621 | if (port->number) | 1632 | if (port_number) |
1622 | write_mos_reg(serial, dummy, SP_CONTROL_REG, 0x01); | 1633 | write_mos_reg(serial, dummy, SP_CONTROL_REG, 0x01); |
1623 | else | 1634 | else |
1624 | write_mos_reg(serial, dummy, SP_CONTROL_REG, 0x02); | 1635 | write_mos_reg(serial, dummy, SP_CONTROL_REG, 0x02); |
@@ -1927,7 +1938,7 @@ static int mos7720_startup(struct usb_serial *serial) | |||
1927 | 1938 | ||
1928 | /* setting configuration feature to one */ | 1939 | /* setting configuration feature to one */ |
1929 | usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0), | 1940 | usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0), |
1930 | (__u8)0x03, 0x00, 0x01, 0x00, NULL, 0x00, 5*HZ); | 1941 | (__u8)0x03, 0x00, 0x01, 0x00, NULL, 0x00, 5000); |
1931 | 1942 | ||
1932 | /* start the interrupt urb */ | 1943 | /* start the interrupt urb */ |
1933 | ret_val = usb_submit_urb(serial->port[0]->interrupt_in_urb, GFP_KERNEL); | 1944 | ret_val = usb_submit_urb(serial->port[0]->interrupt_in_urb, GFP_KERNEL); |
@@ -1970,7 +1981,7 @@ static void mos7720_release(struct usb_serial *serial) | |||
1970 | /* wait for synchronous usb calls to return */ | 1981 | /* wait for synchronous usb calls to return */ |
1971 | if (mos_parport->msg_pending) | 1982 | if (mos_parport->msg_pending) |
1972 | wait_for_completion_timeout(&mos_parport->syncmsg_compl, | 1983 | wait_for_completion_timeout(&mos_parport->syncmsg_compl, |
1973 | MOS_WDR_TIMEOUT); | 1984 | msecs_to_jiffies(MOS_WDR_TIMEOUT)); |
1974 | 1985 | ||
1975 | parport_remove_port(mos_parport->pp); | 1986 | parport_remove_port(mos_parport->pp); |
1976 | usb_set_serial_data(serial, NULL); | 1987 | usb_set_serial_data(serial, NULL); |
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c index a0d5ea545982..7e998081e1cd 100644 --- a/drivers/usb/serial/mos7840.c +++ b/drivers/usb/serial/mos7840.c | |||
@@ -2142,13 +2142,21 @@ static int mos7840_ioctl(struct tty_struct *tty, | |||
2142 | static int mos7810_check(struct usb_serial *serial) | 2142 | static int mos7810_check(struct usb_serial *serial) |
2143 | { | 2143 | { |
2144 | int i, pass_count = 0; | 2144 | int i, pass_count = 0; |
2145 | u8 *buf; | ||
2145 | __u16 data = 0, mcr_data = 0; | 2146 | __u16 data = 0, mcr_data = 0; |
2146 | __u16 test_pattern = 0x55AA; | 2147 | __u16 test_pattern = 0x55AA; |
2148 | int res; | ||
2149 | |||
2150 | buf = kmalloc(VENDOR_READ_LENGTH, GFP_KERNEL); | ||
2151 | if (!buf) | ||
2152 | return 0; /* failed to identify 7810 */ | ||
2147 | 2153 | ||
2148 | /* Store MCR setting */ | 2154 | /* Store MCR setting */ |
2149 | usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0), | 2155 | res = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0), |
2150 | MCS_RDREQ, MCS_RD_RTYPE, 0x0300, MODEM_CONTROL_REGISTER, | 2156 | MCS_RDREQ, MCS_RD_RTYPE, 0x0300, MODEM_CONTROL_REGISTER, |
2151 | &mcr_data, VENDOR_READ_LENGTH, MOS_WDR_TIMEOUT); | 2157 | buf, VENDOR_READ_LENGTH, MOS_WDR_TIMEOUT); |
2158 | if (res == VENDOR_READ_LENGTH) | ||
2159 | mcr_data = *buf; | ||
2152 | 2160 | ||
2153 | for (i = 0; i < 16; i++) { | 2161 | for (i = 0; i < 16; i++) { |
2154 | /* Send the 1-bit test pattern out to MCS7810 test pin */ | 2162 | /* Send the 1-bit test pattern out to MCS7810 test pin */ |
@@ -2158,9 +2166,12 @@ static int mos7810_check(struct usb_serial *serial) | |||
2158 | MODEM_CONTROL_REGISTER, NULL, 0, MOS_WDR_TIMEOUT); | 2166 | MODEM_CONTROL_REGISTER, NULL, 0, MOS_WDR_TIMEOUT); |
2159 | 2167 | ||
2160 | /* Read the test pattern back */ | 2168 | /* Read the test pattern back */ |
2161 | usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0), | 2169 | res = usb_control_msg(serial->dev, |
2162 | MCS_RDREQ, MCS_RD_RTYPE, 0, GPIO_REGISTER, &data, | 2170 | usb_rcvctrlpipe(serial->dev, 0), MCS_RDREQ, |
2163 | VENDOR_READ_LENGTH, MOS_WDR_TIMEOUT); | 2171 | MCS_RD_RTYPE, 0, GPIO_REGISTER, buf, |
2172 | VENDOR_READ_LENGTH, MOS_WDR_TIMEOUT); | ||
2173 | if (res == VENDOR_READ_LENGTH) | ||
2174 | data = *buf; | ||
2164 | 2175 | ||
2165 | /* If this is a MCS7810 device, both test patterns must match */ | 2176 | /* If this is a MCS7810 device, both test patterns must match */ |
2166 | if (((test_pattern >> i) ^ (~data >> 1)) & 0x0001) | 2177 | if (((test_pattern >> i) ^ (~data >> 1)) & 0x0001) |
@@ -2174,6 +2185,8 @@ static int mos7810_check(struct usb_serial *serial) | |||
2174 | MCS_WR_RTYPE, 0x0300 | mcr_data, MODEM_CONTROL_REGISTER, NULL, | 2185 | MCS_WR_RTYPE, 0x0300 | mcr_data, MODEM_CONTROL_REGISTER, NULL, |
2175 | 0, MOS_WDR_TIMEOUT); | 2186 | 0, MOS_WDR_TIMEOUT); |
2176 | 2187 | ||
2188 | kfree(buf); | ||
2189 | |||
2177 | if (pass_count == 16) | 2190 | if (pass_count == 16) |
2178 | return 1; | 2191 | return 1; |
2179 | 2192 | ||
@@ -2183,11 +2196,17 @@ static int mos7810_check(struct usb_serial *serial) | |||
2183 | static int mos7840_calc_num_ports(struct usb_serial *serial) | 2196 | static int mos7840_calc_num_ports(struct usb_serial *serial) |
2184 | { | 2197 | { |
2185 | __u16 data = 0x00; | 2198 | __u16 data = 0x00; |
2199 | u8 *buf; | ||
2186 | int mos7840_num_ports; | 2200 | int mos7840_num_ports; |
2187 | 2201 | ||
2188 | usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0), | 2202 | buf = kzalloc(VENDOR_READ_LENGTH, GFP_KERNEL); |
2189 | MCS_RDREQ, MCS_RD_RTYPE, 0, GPIO_REGISTER, &data, | 2203 | if (buf) { |
2190 | VENDOR_READ_LENGTH, MOS_WDR_TIMEOUT); | 2204 | usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0), |
2205 | MCS_RDREQ, MCS_RD_RTYPE, 0, GPIO_REGISTER, buf, | ||
2206 | VENDOR_READ_LENGTH, MOS_WDR_TIMEOUT); | ||
2207 | data = *buf; | ||
2208 | kfree(buf); | ||
2209 | } | ||
2191 | 2210 | ||
2192 | if (serial->dev->descriptor.idProduct == MOSCHIP_DEVICE_ID_7810 || | 2211 | if (serial->dev->descriptor.idProduct == MOSCHIP_DEVICE_ID_7810 || |
2193 | serial->dev->descriptor.idProduct == MOSCHIP_DEVICE_ID_7820) { | 2212 | serial->dev->descriptor.idProduct == MOSCHIP_DEVICE_ID_7820) { |
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 93d02bc4eb52..bd4323ddae1a 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c | |||
@@ -250,13 +250,7 @@ static void option_instat_callback(struct urb *urb); | |||
250 | #define ZTE_PRODUCT_MF622 0x0001 | 250 | #define ZTE_PRODUCT_MF622 0x0001 |
251 | #define ZTE_PRODUCT_MF628 0x0015 | 251 | #define ZTE_PRODUCT_MF628 0x0015 |
252 | #define ZTE_PRODUCT_MF626 0x0031 | 252 | #define ZTE_PRODUCT_MF626 0x0031 |
253 | #define ZTE_PRODUCT_CDMA_TECH 0xfffe | ||
254 | #define ZTE_PRODUCT_AC8710 0xfff1 | ||
255 | #define ZTE_PRODUCT_AC2726 0xfff5 | ||
256 | #define ZTE_PRODUCT_AC8710T 0xffff | ||
257 | #define ZTE_PRODUCT_MC2718 0xffe8 | 253 | #define ZTE_PRODUCT_MC2718 0xffe8 |
258 | #define ZTE_PRODUCT_AD3812 0xffeb | ||
259 | #define ZTE_PRODUCT_MC2716 0xffed | ||
260 | 254 | ||
261 | #define BENQ_VENDOR_ID 0x04a5 | 255 | #define BENQ_VENDOR_ID 0x04a5 |
262 | #define BENQ_PRODUCT_H10 0x4068 | 256 | #define BENQ_PRODUCT_H10 0x4068 |
@@ -495,18 +489,10 @@ static const struct option_blacklist_info zte_k3765_z_blacklist = { | |||
495 | .reserved = BIT(4), | 489 | .reserved = BIT(4), |
496 | }; | 490 | }; |
497 | 491 | ||
498 | static const struct option_blacklist_info zte_ad3812_z_blacklist = { | ||
499 | .sendsetup = BIT(0) | BIT(1) | BIT(2), | ||
500 | }; | ||
501 | |||
502 | static const struct option_blacklist_info zte_mc2718_z_blacklist = { | 492 | static const struct option_blacklist_info zte_mc2718_z_blacklist = { |
503 | .sendsetup = BIT(1) | BIT(2) | BIT(3) | BIT(4), | 493 | .sendsetup = BIT(1) | BIT(2) | BIT(3) | BIT(4), |
504 | }; | 494 | }; |
505 | 495 | ||
506 | static const struct option_blacklist_info zte_mc2716_z_blacklist = { | ||
507 | .sendsetup = BIT(1) | BIT(2) | BIT(3), | ||
508 | }; | ||
509 | |||
510 | static const struct option_blacklist_info huawei_cdc12_blacklist = { | 496 | static const struct option_blacklist_info huawei_cdc12_blacklist = { |
511 | .reserved = BIT(1) | BIT(2), | 497 | .reserved = BIT(1) | BIT(2), |
512 | }; | 498 | }; |
@@ -593,6 +579,8 @@ static const struct usb_device_id option_ids[] = { | |||
593 | .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist }, | 579 | .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist }, |
594 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3765, 0xff, 0xff, 0xff), | 580 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3765, 0xff, 0xff, 0xff), |
595 | .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist }, | 581 | .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist }, |
582 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x14ac, 0xff, 0xff, 0xff), /* Huawei E1820 */ | ||
583 | .driver_info = (kernel_ulong_t) &net_intf1_blacklist }, | ||
596 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4605, 0xff, 0xff, 0xff), | 584 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4605, 0xff, 0xff, 0xff), |
597 | .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist }, | 585 | .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist }, |
598 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0xff, 0xff) }, | 586 | { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0xff, 0xff) }, |
@@ -797,7 +785,6 @@ static const struct usb_device_id option_ids[] = { | |||
797 | { USB_DEVICE_INTERFACE_CLASS(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_1012, 0xff) }, | 785 | { USB_DEVICE_INTERFACE_CLASS(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_1012, 0xff) }, |
798 | { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC650) }, | 786 | { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC650) }, |
799 | { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC680) }, | 787 | { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC680) }, |
800 | { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6000)}, /* ZTE AC8700 */ | ||
801 | { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */ | 788 | { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */ |
802 | { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000)}, /* SIMCom SIM5218 */ | 789 | { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000)}, /* SIMCom SIM5218 */ |
803 | { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6280) }, /* BP3-USB & BP3-EXT HSDPA */ | 790 | { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6280) }, /* BP3-USB & BP3-EXT HSDPA */ |
@@ -1199,16 +1186,9 @@ static const struct usb_device_id option_ids[] = { | |||
1199 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0178, 0xff, 0xff, 0xff), | 1186 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0178, 0xff, 0xff, 0xff), |
1200 | .driver_info = (kernel_ulong_t)&net_intf3_blacklist }, | 1187 | .driver_info = (kernel_ulong_t)&net_intf3_blacklist }, |
1201 | 1188 | ||
1202 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH, 0xff, 0xff, 0xff) }, | 1189 | /* NOTE: most ZTE CDMA devices should be driven by zte_ev, not option */ |
1203 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710, 0xff, 0xff, 0xff) }, | ||
1204 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC2726, 0xff, 0xff, 0xff) }, | ||
1205 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710T, 0xff, 0xff, 0xff) }, | ||
1206 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MC2718, 0xff, 0xff, 0xff), | 1190 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MC2718, 0xff, 0xff, 0xff), |
1207 | .driver_info = (kernel_ulong_t)&zte_mc2718_z_blacklist }, | 1191 | .driver_info = (kernel_ulong_t)&zte_mc2718_z_blacklist }, |
1208 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AD3812, 0xff, 0xff, 0xff), | ||
1209 | .driver_info = (kernel_ulong_t)&zte_ad3812_z_blacklist }, | ||
1210 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MC2716, 0xff, 0xff, 0xff), | ||
1211 | .driver_info = (kernel_ulong_t)&zte_mc2716_z_blacklist }, | ||
1212 | { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x02, 0x01) }, | 1192 | { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x02, 0x01) }, |
1213 | { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x02, 0x05) }, | 1193 | { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x02, 0x05) }, |
1214 | { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x86, 0x10) }, | 1194 | { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x86, 0x10) }, |
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index 7151659367a0..048cd44d51b1 100644 --- a/drivers/usb/serial/pl2303.c +++ b/drivers/usb/serial/pl2303.c | |||
@@ -284,7 +284,7 @@ static void pl2303_set_termios(struct tty_struct *tty, | |||
284 | serial settings even to the same values as before. Thus | 284 | serial settings even to the same values as before. Thus |
285 | we actually need to filter in this specific case */ | 285 | we actually need to filter in this specific case */ |
286 | 286 | ||
287 | if (!tty_termios_hw_change(&tty->termios, old_termios)) | 287 | if (old_termios && !tty_termios_hw_change(&tty->termios, old_termios)) |
288 | return; | 288 | return; |
289 | 289 | ||
290 | cflag = tty->termios.c_cflag; | 290 | cflag = tty->termios.c_cflag; |
@@ -293,7 +293,8 @@ static void pl2303_set_termios(struct tty_struct *tty, | |||
293 | if (!buf) { | 293 | if (!buf) { |
294 | dev_err(&port->dev, "%s - out of memory.\n", __func__); | 294 | dev_err(&port->dev, "%s - out of memory.\n", __func__); |
295 | /* Report back no change occurred */ | 295 | /* Report back no change occurred */ |
296 | tty->termios = *old_termios; | 296 | if (old_termios) |
297 | tty->termios = *old_termios; | ||
297 | return; | 298 | return; |
298 | } | 299 | } |
299 | 300 | ||
@@ -433,7 +434,7 @@ static void pl2303_set_termios(struct tty_struct *tty, | |||
433 | control = priv->line_control; | 434 | control = priv->line_control; |
434 | if ((cflag & CBAUD) == B0) | 435 | if ((cflag & CBAUD) == B0) |
435 | priv->line_control &= ~(CONTROL_DTR | CONTROL_RTS); | 436 | priv->line_control &= ~(CONTROL_DTR | CONTROL_RTS); |
436 | else if ((old_termios->c_cflag & CBAUD) == B0) | 437 | else if (old_termios && (old_termios->c_cflag & CBAUD) == B0) |
437 | priv->line_control |= (CONTROL_DTR | CONTROL_RTS); | 438 | priv->line_control |= (CONTROL_DTR | CONTROL_RTS); |
438 | if (control != priv->line_control) { | 439 | if (control != priv->line_control) { |
439 | control = priv->line_control; | 440 | control = priv->line_control; |
@@ -492,7 +493,6 @@ static void pl2303_close(struct usb_serial_port *port) | |||
492 | 493 | ||
493 | static int pl2303_open(struct tty_struct *tty, struct usb_serial_port *port) | 494 | static int pl2303_open(struct tty_struct *tty, struct usb_serial_port *port) |
494 | { | 495 | { |
495 | struct ktermios tmp_termios; | ||
496 | struct usb_serial *serial = port->serial; | 496 | struct usb_serial *serial = port->serial; |
497 | struct pl2303_serial_private *spriv = usb_get_serial_data(serial); | 497 | struct pl2303_serial_private *spriv = usb_get_serial_data(serial); |
498 | int result; | 498 | int result; |
@@ -508,7 +508,7 @@ static int pl2303_open(struct tty_struct *tty, struct usb_serial_port *port) | |||
508 | 508 | ||
509 | /* Setup termios */ | 509 | /* Setup termios */ |
510 | if (tty) | 510 | if (tty) |
511 | pl2303_set_termios(tty, port, &tmp_termios); | 511 | pl2303_set_termios(tty, port, NULL); |
512 | 512 | ||
513 | result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); | 513 | result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); |
514 | if (result) { | 514 | if (result) { |
diff --git a/drivers/usb/serial/qcserial.c b/drivers/usb/serial/qcserial.c index 59b32b782126..bd794b43898c 100644 --- a/drivers/usb/serial/qcserial.c +++ b/drivers/usb/serial/qcserial.c | |||
@@ -118,6 +118,7 @@ static const struct usb_device_id id_table[] = { | |||
118 | {USB_DEVICE(0x1199, 0x901b)}, /* Sierra Wireless MC7770 */ | 118 | {USB_DEVICE(0x1199, 0x901b)}, /* Sierra Wireless MC7770 */ |
119 | {USB_DEVICE(0x12D1, 0x14F0)}, /* Sony Gobi 3000 QDL */ | 119 | {USB_DEVICE(0x12D1, 0x14F0)}, /* Sony Gobi 3000 QDL */ |
120 | {USB_DEVICE(0x12D1, 0x14F1)}, /* Sony Gobi 3000 Composite */ | 120 | {USB_DEVICE(0x12D1, 0x14F1)}, /* Sony Gobi 3000 Composite */ |
121 | {USB_DEVICE(0x0AF0, 0x8120)}, /* Option GTM681W */ | ||
121 | 122 | ||
122 | /* non Gobi Qualcomm serial devices */ | 123 | /* non Gobi Qualcomm serial devices */ |
123 | {USB_DEVICE_INTERFACE_NUMBER(0x0f3d, 0x68a2, 0)}, /* Sierra Wireless MC7700 Device Management */ | 124 | {USB_DEVICE_INTERFACE_NUMBER(0x0f3d, 0x68a2, 0)}, /* Sierra Wireless MC7700 Device Management */ |
diff --git a/drivers/usb/serial/spcp8x5.c b/drivers/usb/serial/spcp8x5.c index cf3df793c2b7..ddf6c47137dc 100644 --- a/drivers/usb/serial/spcp8x5.c +++ b/drivers/usb/serial/spcp8x5.c | |||
@@ -291,7 +291,6 @@ static void spcp8x5_set_termios(struct tty_struct *tty, | |||
291 | struct spcp8x5_private *priv = usb_get_serial_port_data(port); | 291 | struct spcp8x5_private *priv = usb_get_serial_port_data(port); |
292 | unsigned long flags; | 292 | unsigned long flags; |
293 | unsigned int cflag = tty->termios.c_cflag; | 293 | unsigned int cflag = tty->termios.c_cflag; |
294 | unsigned int old_cflag = old_termios->c_cflag; | ||
295 | unsigned short uartdata; | 294 | unsigned short uartdata; |
296 | unsigned char buf[2] = {0, 0}; | 295 | unsigned char buf[2] = {0, 0}; |
297 | int baud; | 296 | int baud; |
@@ -299,15 +298,15 @@ static void spcp8x5_set_termios(struct tty_struct *tty, | |||
299 | u8 control; | 298 | u8 control; |
300 | 299 | ||
301 | /* check that they really want us to change something */ | 300 | /* check that they really want us to change something */ |
302 | if (!tty_termios_hw_change(&tty->termios, old_termios)) | 301 | if (old_termios && !tty_termios_hw_change(&tty->termios, old_termios)) |
303 | return; | 302 | return; |
304 | 303 | ||
305 | /* set DTR/RTS active */ | 304 | /* set DTR/RTS active */ |
306 | spin_lock_irqsave(&priv->lock, flags); | 305 | spin_lock_irqsave(&priv->lock, flags); |
307 | control = priv->line_control; | 306 | control = priv->line_control; |
308 | if ((old_cflag & CBAUD) == B0) { | 307 | if (old_termios && (old_termios->c_cflag & CBAUD) == B0) { |
309 | priv->line_control |= MCR_DTR; | 308 | priv->line_control |= MCR_DTR; |
310 | if (!(old_cflag & CRTSCTS)) | 309 | if (!(old_termios->c_cflag & CRTSCTS)) |
311 | priv->line_control |= MCR_RTS; | 310 | priv->line_control |= MCR_RTS; |
312 | } | 311 | } |
313 | if (control != priv->line_control) { | 312 | if (control != priv->line_control) { |
@@ -394,7 +393,6 @@ static void spcp8x5_set_termios(struct tty_struct *tty, | |||
394 | 393 | ||
395 | static int spcp8x5_open(struct tty_struct *tty, struct usb_serial_port *port) | 394 | static int spcp8x5_open(struct tty_struct *tty, struct usb_serial_port *port) |
396 | { | 395 | { |
397 | struct ktermios tmp_termios; | ||
398 | struct usb_serial *serial = port->serial; | 396 | struct usb_serial *serial = port->serial; |
399 | struct spcp8x5_private *priv = usb_get_serial_port_data(port); | 397 | struct spcp8x5_private *priv = usb_get_serial_port_data(port); |
400 | int ret; | 398 | int ret; |
@@ -411,7 +409,7 @@ static int spcp8x5_open(struct tty_struct *tty, struct usb_serial_port *port) | |||
411 | spcp8x5_set_ctrl_line(port, priv->line_control); | 409 | spcp8x5_set_ctrl_line(port, priv->line_control); |
412 | 410 | ||
413 | if (tty) | 411 | if (tty) |
414 | spcp8x5_set_termios(tty, port, &tmp_termios); | 412 | spcp8x5_set_termios(tty, port, NULL); |
415 | 413 | ||
416 | port->port.drain_delay = 256; | 414 | port->port.drain_delay = 256; |
417 | 415 | ||
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c index c92c5ed4e580..e581c2549a57 100644 --- a/drivers/usb/serial/ti_usb_3410_5052.c +++ b/drivers/usb/serial/ti_usb_3410_5052.c | |||
@@ -172,7 +172,8 @@ static struct usb_device_id ti_id_table_3410[15+TI_EXTRA_VID_PID_COUNT+1] = { | |||
172 | { USB_DEVICE(IBM_VENDOR_ID, IBM_4543_PRODUCT_ID) }, | 172 | { USB_DEVICE(IBM_VENDOR_ID, IBM_4543_PRODUCT_ID) }, |
173 | { USB_DEVICE(IBM_VENDOR_ID, IBM_454B_PRODUCT_ID) }, | 173 | { USB_DEVICE(IBM_VENDOR_ID, IBM_454B_PRODUCT_ID) }, |
174 | { USB_DEVICE(IBM_VENDOR_ID, IBM_454C_PRODUCT_ID) }, | 174 | { USB_DEVICE(IBM_VENDOR_ID, IBM_454C_PRODUCT_ID) }, |
175 | { USB_DEVICE(ABBOTT_VENDOR_ID, ABBOTT_PRODUCT_ID) }, | 175 | { USB_DEVICE(ABBOTT_VENDOR_ID, ABBOTT_STEREO_PLUG_ID) }, |
176 | { USB_DEVICE(ABBOTT_VENDOR_ID, ABBOTT_STRIP_PORT_ID) }, | ||
176 | { USB_DEVICE(TI_VENDOR_ID, FRI2_PRODUCT_ID) }, | 177 | { USB_DEVICE(TI_VENDOR_ID, FRI2_PRODUCT_ID) }, |
177 | }; | 178 | }; |
178 | 179 | ||
diff --git a/drivers/usb/serial/ti_usb_3410_5052.h b/drivers/usb/serial/ti_usb_3410_5052.h index b353e7e3d480..4a2423e84d55 100644 --- a/drivers/usb/serial/ti_usb_3410_5052.h +++ b/drivers/usb/serial/ti_usb_3410_5052.h | |||
@@ -52,7 +52,9 @@ | |||
52 | 52 | ||
53 | /* Abbott Diabetics vendor and product ids */ | 53 | /* Abbott Diabetics vendor and product ids */ |
54 | #define ABBOTT_VENDOR_ID 0x1a61 | 54 | #define ABBOTT_VENDOR_ID 0x1a61 |
55 | #define ABBOTT_PRODUCT_ID 0x3410 | 55 | #define ABBOTT_STEREO_PLUG_ID 0x3410 |
56 | #define ABBOTT_PRODUCT_ID ABBOTT_STEREO_PLUG_ID | ||
57 | #define ABBOTT_STRIP_PORT_ID 0x3420 | ||
56 | 58 | ||
57 | /* Commands */ | 59 | /* Commands */ |
58 | #define TI_GET_VERSION 0x01 | 60 | #define TI_GET_VERSION 0x01 |
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 4753c005cfb6..5f6b1ff9d29e 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c | |||
@@ -408,7 +408,7 @@ static int serial_ioctl(struct tty_struct *tty, | |||
408 | unsigned int cmd, unsigned long arg) | 408 | unsigned int cmd, unsigned long arg) |
409 | { | 409 | { |
410 | struct usb_serial_port *port = tty->driver_data; | 410 | struct usb_serial_port *port = tty->driver_data; |
411 | int retval = -ENODEV; | 411 | int retval = -ENOIOCTLCMD; |
412 | 412 | ||
413 | dev_dbg(tty->dev, "%s - cmd 0x%.4x\n", __func__, cmd); | 413 | dev_dbg(tty->dev, "%s - cmd 0x%.4x\n", __func__, cmd); |
414 | 414 | ||
@@ -420,8 +420,6 @@ static int serial_ioctl(struct tty_struct *tty, | |||
420 | default: | 420 | default: |
421 | if (port->serial->type->ioctl) | 421 | if (port->serial->type->ioctl) |
422 | retval = port->serial->type->ioctl(tty, cmd, arg); | 422 | retval = port->serial->type->ioctl(tty, cmd, arg); |
423 | else | ||
424 | retval = -ENOIOCTLCMD; | ||
425 | } | 423 | } |
426 | 424 | ||
427 | return retval; | 425 | return retval; |
diff --git a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c index 7573ec8a084f..9910aa2edf4b 100644 --- a/drivers/usb/serial/visor.c +++ b/drivers/usb/serial/visor.c | |||
@@ -560,10 +560,19 @@ static int treo_attach(struct usb_serial *serial) | |||
560 | */ | 560 | */ |
561 | #define COPY_PORT(dest, src) \ | 561 | #define COPY_PORT(dest, src) \ |
562 | do { \ | 562 | do { \ |
563 | int i; \ | ||
564 | \ | ||
565 | for (i = 0; i < ARRAY_SIZE(src->read_urbs); ++i) { \ | ||
566 | dest->read_urbs[i] = src->read_urbs[i]; \ | ||
567 | dest->read_urbs[i]->context = dest; \ | ||
568 | dest->bulk_in_buffers[i] = src->bulk_in_buffers[i]; \ | ||
569 | } \ | ||
563 | dest->read_urb = src->read_urb; \ | 570 | dest->read_urb = src->read_urb; \ |
564 | dest->bulk_in_endpointAddress = src->bulk_in_endpointAddress;\ | 571 | dest->bulk_in_endpointAddress = src->bulk_in_endpointAddress;\ |
565 | dest->bulk_in_buffer = src->bulk_in_buffer; \ | 572 | dest->bulk_in_buffer = src->bulk_in_buffer; \ |
573 | dest->bulk_in_size = src->bulk_in_size; \ | ||
566 | dest->interrupt_in_urb = src->interrupt_in_urb; \ | 574 | dest->interrupt_in_urb = src->interrupt_in_urb; \ |
575 | dest->interrupt_in_urb->context = dest; \ | ||
567 | dest->interrupt_in_endpointAddress = \ | 576 | dest->interrupt_in_endpointAddress = \ |
568 | src->interrupt_in_endpointAddress;\ | 577 | src->interrupt_in_endpointAddress;\ |
569 | dest->interrupt_in_buffer = src->interrupt_in_buffer; \ | 578 | dest->interrupt_in_buffer = src->interrupt_in_buffer; \ |
diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c index b9fca3586d74..347caad47a12 100644 --- a/drivers/usb/serial/whiteheat.c +++ b/drivers/usb/serial/whiteheat.c | |||
@@ -649,7 +649,7 @@ static void firm_setup_port(struct tty_struct *tty) | |||
649 | struct whiteheat_port_settings port_settings; | 649 | struct whiteheat_port_settings port_settings; |
650 | unsigned int cflag = tty->termios.c_cflag; | 650 | unsigned int cflag = tty->termios.c_cflag; |
651 | 651 | ||
652 | port_settings.port = port->number + 1; | 652 | port_settings.port = port->number - port->serial->minor + 1; |
653 | 653 | ||
654 | /* get the byte size */ | 654 | /* get the byte size */ |
655 | switch (cflag & CSIZE) { | 655 | switch (cflag & CSIZE) { |
diff --git a/drivers/usb/serial/zte_ev.c b/drivers/usb/serial/zte_ev.c index 39ee7373b4ee..fca4c752a4ed 100644 --- a/drivers/usb/serial/zte_ev.c +++ b/drivers/usb/serial/zte_ev.c | |||
@@ -41,9 +41,6 @@ static int zte_ev_usb_serial_open(struct tty_struct *tty, | |||
41 | int len; | 41 | int len; |
42 | unsigned char *buf; | 42 | unsigned char *buf; |
43 | 43 | ||
44 | if (port->number != 0) | ||
45 | return -ENODEV; | ||
46 | |||
47 | buf = kmalloc(MAX_SETUP_DATA_SIZE, GFP_KERNEL); | 44 | buf = kmalloc(MAX_SETUP_DATA_SIZE, GFP_KERNEL); |
48 | if (!buf) | 45 | if (!buf) |
49 | return -ENOMEM; | 46 | return -ENOMEM; |
@@ -53,7 +50,7 @@ static int zte_ev_usb_serial_open(struct tty_struct *tty, | |||
53 | result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), | 50 | result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), |
54 | 0x22, 0x21, | 51 | 0x22, 0x21, |
55 | 0x0001, 0x0000, NULL, len, | 52 | 0x0001, 0x0000, NULL, len, |
56 | HZ * USB_CTRL_GET_TIMEOUT); | 53 | USB_CTRL_GET_TIMEOUT); |
57 | dev_dbg(dev, "result = %d\n", result); | 54 | dev_dbg(dev, "result = %d\n", result); |
58 | 55 | ||
59 | /* send 2st cmd and recieve data */ | 56 | /* send 2st cmd and recieve data */ |
@@ -65,7 +62,7 @@ static int zte_ev_usb_serial_open(struct tty_struct *tty, | |||
65 | result = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), | 62 | result = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), |
66 | 0x21, 0xa1, | 63 | 0x21, 0xa1, |
67 | 0x0000, 0x0000, buf, len, | 64 | 0x0000, 0x0000, buf, len, |
68 | HZ * USB_CTRL_GET_TIMEOUT); | 65 | USB_CTRL_GET_TIMEOUT); |
69 | debug_data(dev, __func__, len, buf, result); | 66 | debug_data(dev, __func__, len, buf, result); |
70 | 67 | ||
71 | /* send 3 cmd */ | 68 | /* send 3 cmd */ |
@@ -84,7 +81,7 @@ static int zte_ev_usb_serial_open(struct tty_struct *tty, | |||
84 | result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), | 81 | result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), |
85 | 0x20, 0x21, | 82 | 0x20, 0x21, |
86 | 0x0000, 0x0000, buf, len, | 83 | 0x0000, 0x0000, buf, len, |
87 | HZ * USB_CTRL_GET_TIMEOUT); | 84 | USB_CTRL_GET_TIMEOUT); |
88 | debug_data(dev, __func__, len, buf, result); | 85 | debug_data(dev, __func__, len, buf, result); |
89 | 86 | ||
90 | /* send 4 cmd */ | 87 | /* send 4 cmd */ |
@@ -95,7 +92,7 @@ static int zte_ev_usb_serial_open(struct tty_struct *tty, | |||
95 | result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), | 92 | result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), |
96 | 0x22, 0x21, | 93 | 0x22, 0x21, |
97 | 0x0003, 0x0000, NULL, len, | 94 | 0x0003, 0x0000, NULL, len, |
98 | HZ * USB_CTRL_GET_TIMEOUT); | 95 | USB_CTRL_GET_TIMEOUT); |
99 | dev_dbg(dev, "result = %d\n", result); | 96 | dev_dbg(dev, "result = %d\n", result); |
100 | 97 | ||
101 | /* send 5 cmd */ | 98 | /* send 5 cmd */ |
@@ -107,7 +104,7 @@ static int zte_ev_usb_serial_open(struct tty_struct *tty, | |||
107 | result = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), | 104 | result = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), |
108 | 0x21, 0xa1, | 105 | 0x21, 0xa1, |
109 | 0x0000, 0x0000, buf, len, | 106 | 0x0000, 0x0000, buf, len, |
110 | HZ * USB_CTRL_GET_TIMEOUT); | 107 | USB_CTRL_GET_TIMEOUT); |
111 | debug_data(dev, __func__, len, buf, result); | 108 | debug_data(dev, __func__, len, buf, result); |
112 | 109 | ||
113 | /* send 6 cmd */ | 110 | /* send 6 cmd */ |
@@ -126,7 +123,7 @@ static int zte_ev_usb_serial_open(struct tty_struct *tty, | |||
126 | result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), | 123 | result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), |
127 | 0x20, 0x21, | 124 | 0x20, 0x21, |
128 | 0x0000, 0x0000, buf, len, | 125 | 0x0000, 0x0000, buf, len, |
129 | HZ * USB_CTRL_GET_TIMEOUT); | 126 | USB_CTRL_GET_TIMEOUT); |
130 | debug_data(dev, __func__, len, buf, result); | 127 | debug_data(dev, __func__, len, buf, result); |
131 | kfree(buf); | 128 | kfree(buf); |
132 | 129 | ||
@@ -166,9 +163,6 @@ static void zte_ev_usb_serial_close(struct usb_serial_port *port) | |||
166 | int len; | 163 | int len; |
167 | unsigned char *buf; | 164 | unsigned char *buf; |
168 | 165 | ||
169 | if (port->number != 0) | ||
170 | return; | ||
171 | |||
172 | buf = kmalloc(MAX_SETUP_DATA_SIZE, GFP_KERNEL); | 166 | buf = kmalloc(MAX_SETUP_DATA_SIZE, GFP_KERNEL); |
173 | if (!buf) | 167 | if (!buf) |
174 | return; | 168 | return; |
@@ -178,7 +172,7 @@ static void zte_ev_usb_serial_close(struct usb_serial_port *port) | |||
178 | result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), | 172 | result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), |
179 | 0x22, 0x21, | 173 | 0x22, 0x21, |
180 | 0x0002, 0x0000, NULL, len, | 174 | 0x0002, 0x0000, NULL, len, |
181 | HZ * USB_CTRL_GET_TIMEOUT); | 175 | USB_CTRL_GET_TIMEOUT); |
182 | dev_dbg(dev, "result = %d\n", result); | 176 | dev_dbg(dev, "result = %d\n", result); |
183 | 177 | ||
184 | /* send 2st ctl cmd(CTL 21 22 03 00 00 00 00 00 ) */ | 178 | /* send 2st ctl cmd(CTL 21 22 03 00 00 00 00 00 ) */ |
@@ -186,7 +180,7 @@ static void zte_ev_usb_serial_close(struct usb_serial_port *port) | |||
186 | result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), | 180 | result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), |
187 | 0x22, 0x21, | 181 | 0x22, 0x21, |
188 | 0x0003, 0x0000, NULL, len, | 182 | 0x0003, 0x0000, NULL, len, |
189 | HZ * USB_CTRL_GET_TIMEOUT); | 183 | USB_CTRL_GET_TIMEOUT); |
190 | dev_dbg(dev, "result = %d\n", result); | 184 | dev_dbg(dev, "result = %d\n", result); |
191 | 185 | ||
192 | /* send 3st cmd and recieve data */ | 186 | /* send 3st cmd and recieve data */ |
@@ -198,7 +192,7 @@ static void zte_ev_usb_serial_close(struct usb_serial_port *port) | |||
198 | result = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), | 192 | result = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), |
199 | 0x21, 0xa1, | 193 | 0x21, 0xa1, |
200 | 0x0000, 0x0000, buf, len, | 194 | 0x0000, 0x0000, buf, len, |
201 | HZ * USB_CTRL_GET_TIMEOUT); | 195 | USB_CTRL_GET_TIMEOUT); |
202 | debug_data(dev, __func__, len, buf, result); | 196 | debug_data(dev, __func__, len, buf, result); |
203 | 197 | ||
204 | /* send 4 cmd */ | 198 | /* send 4 cmd */ |
@@ -217,7 +211,7 @@ static void zte_ev_usb_serial_close(struct usb_serial_port *port) | |||
217 | result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), | 211 | result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), |
218 | 0x20, 0x21, | 212 | 0x20, 0x21, |
219 | 0x0000, 0x0000, buf, len, | 213 | 0x0000, 0x0000, buf, len, |
220 | HZ * USB_CTRL_GET_TIMEOUT); | 214 | USB_CTRL_GET_TIMEOUT); |
221 | debug_data(dev, __func__, len, buf, result); | 215 | debug_data(dev, __func__, len, buf, result); |
222 | 216 | ||
223 | /* send 5 cmd */ | 217 | /* send 5 cmd */ |
@@ -228,7 +222,7 @@ static void zte_ev_usb_serial_close(struct usb_serial_port *port) | |||
228 | result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), | 222 | result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), |
229 | 0x22, 0x21, | 223 | 0x22, 0x21, |
230 | 0x0003, 0x0000, NULL, len, | 224 | 0x0003, 0x0000, NULL, len, |
231 | HZ * USB_CTRL_GET_TIMEOUT); | 225 | USB_CTRL_GET_TIMEOUT); |
232 | dev_dbg(dev, "result = %d\n", result); | 226 | dev_dbg(dev, "result = %d\n", result); |
233 | 227 | ||
234 | /* send 6 cmd */ | 228 | /* send 6 cmd */ |
@@ -240,7 +234,7 @@ static void zte_ev_usb_serial_close(struct usb_serial_port *port) | |||
240 | result = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), | 234 | result = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), |
241 | 0x21, 0xa1, | 235 | 0x21, 0xa1, |
242 | 0x0000, 0x0000, buf, len, | 236 | 0x0000, 0x0000, buf, len, |
243 | HZ * USB_CTRL_GET_TIMEOUT); | 237 | USB_CTRL_GET_TIMEOUT); |
244 | debug_data(dev, __func__, len, buf, result); | 238 | debug_data(dev, __func__, len, buf, result); |
245 | 239 | ||
246 | /* send 7 cmd */ | 240 | /* send 7 cmd */ |
@@ -259,7 +253,7 @@ static void zte_ev_usb_serial_close(struct usb_serial_port *port) | |||
259 | result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), | 253 | result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), |
260 | 0x20, 0x21, | 254 | 0x20, 0x21, |
261 | 0x0000, 0x0000, buf, len, | 255 | 0x0000, 0x0000, buf, len, |
262 | HZ * USB_CTRL_GET_TIMEOUT); | 256 | USB_CTRL_GET_TIMEOUT); |
263 | debug_data(dev, __func__, len, buf, result); | 257 | debug_data(dev, __func__, len, buf, result); |
264 | 258 | ||
265 | /* send 8 cmd */ | 259 | /* send 8 cmd */ |
@@ -270,7 +264,7 @@ static void zte_ev_usb_serial_close(struct usb_serial_port *port) | |||
270 | result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), | 264 | result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), |
271 | 0x22, 0x21, | 265 | 0x22, 0x21, |
272 | 0x0003, 0x0000, NULL, len, | 266 | 0x0003, 0x0000, NULL, len, |
273 | HZ * USB_CTRL_GET_TIMEOUT); | 267 | USB_CTRL_GET_TIMEOUT); |
274 | dev_dbg(dev, "result = %d\n", result); | 268 | dev_dbg(dev, "result = %d\n", result); |
275 | 269 | ||
276 | kfree(buf); | 270 | kfree(buf); |
@@ -279,11 +273,29 @@ static void zte_ev_usb_serial_close(struct usb_serial_port *port) | |||
279 | } | 273 | } |
280 | 274 | ||
281 | static const struct usb_device_id id_table[] = { | 275 | static const struct usb_device_id id_table[] = { |
282 | { USB_DEVICE(0x19d2, 0xffff) }, /* AC8700 */ | 276 | /* AC8710, AC8710T */ |
283 | { USB_DEVICE(0x19d2, 0xfffe) }, | 277 | { USB_DEVICE_AND_INTERFACE_INFO(0x19d2, 0xffff, 0xff, 0xff, 0xff) }, |
284 | { USB_DEVICE(0x19d2, 0xfffd) }, /* MG880 */ | 278 | /* AC8700 */ |
279 | { USB_DEVICE_AND_INTERFACE_INFO(0x19d2, 0xfffe, 0xff, 0xff, 0xff) }, | ||
280 | /* MG880 */ | ||
281 | { USB_DEVICE(0x19d2, 0xfffd) }, | ||
282 | { USB_DEVICE(0x19d2, 0xfffc) }, | ||
283 | { USB_DEVICE(0x19d2, 0xfffb) }, | ||
284 | /* AC2726, AC8710_V3 */ | ||
285 | { USB_DEVICE_AND_INTERFACE_INFO(0x19d2, 0xfff1, 0xff, 0xff, 0xff) }, | ||
286 | { USB_DEVICE(0x19d2, 0xfff6) }, | ||
287 | { USB_DEVICE(0x19d2, 0xfff7) }, | ||
288 | { USB_DEVICE(0x19d2, 0xfff8) }, | ||
289 | { USB_DEVICE(0x19d2, 0xfff9) }, | ||
290 | { USB_DEVICE(0x19d2, 0xffee) }, | ||
291 | /* AC2716, MC2716 */ | ||
292 | { USB_DEVICE_AND_INTERFACE_INFO(0x19d2, 0xffed, 0xff, 0xff, 0xff) }, | ||
293 | /* AD3812 */ | ||
294 | { USB_DEVICE_AND_INTERFACE_INFO(0x19d2, 0xffeb, 0xff, 0xff, 0xff) }, | ||
295 | { USB_DEVICE(0x19d2, 0xffec) }, | ||
285 | { USB_DEVICE(0x05C6, 0x3197) }, | 296 | { USB_DEVICE(0x05C6, 0x3197) }, |
286 | { USB_DEVICE(0x05C6, 0x6000) }, | 297 | { USB_DEVICE(0x05C6, 0x6000) }, |
298 | { USB_DEVICE(0x05C6, 0x9008) }, | ||
287 | { }, | 299 | { }, |
288 | }; | 300 | }; |
289 | MODULE_DEVICE_TABLE(usb, id_table); | 301 | MODULE_DEVICE_TABLE(usb, id_table); |