Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'usb-5.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
"Here are some small, last-minute, USB driver fixes for 5.11-rc7

They all resolve issues reported, or are a few new device ids for some
drivers. They include:

- new device ids for some usb-serial drivers

- xhci fixes for a variety of reported problems

- dwc3 driver bugfixes

- dwc2 driver bugfixes

- usblp driver bugfix

- thunderbolt bugfix

- few other tiny fixes

All have been in linux-next with no reported issues"

* tag 'usb-5.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
usb: dwc2: Fix endpoint direction check in ep_from_windex
usb: dwc3: fix clock issue during resume in OTG mode
xhci: fix bounce buffer usage for non-sg list case
usb: host: xhci: mvebu: make USB 3.0 PHY optional for Armada 3720
usb: xhci-mtk: break loop when find the endpoint to drop
usb: xhci-mtk: skip dropping bandwidth of unchecked endpoints
usb: renesas_usbhs: Clear pipe running flag in usbhs_pkt_pop()
USB: gadget: legacy: fix an error code in eth_bind()
thunderbolt: Fix possible NULL pointer dereference in tb_acpi_add_link()
USB: serial: option: Adding support for Cinterion MV31
usb: xhci-mtk: fix unreleased bandwidth data
usb: gadget: aspeed: add missing of_node_put
USB: usblp: don't call usb_set_interface if there's a single alt
USB: serial: cp210x: add pid/vid for WSDA-200-USB
USB: serial: cp210x: add new VID/PID for supporting Teraoka AD2000

+237 -70
+1 -1
drivers/thunderbolt/acpi.c
··· 56 56 * managed with the xHCI and the SuperSpeed hub so we create the 57 57 * link from xHCI instead. 58 58 */ 59 - while (!dev_is_pci(dev)) 59 + while (dev && !dev_is_pci(dev)) 60 60 dev = dev->parent; 61 61 62 62 if (!dev)
+11 -8
drivers/usb/class/usblp.c
··· 1329 1329 if (protocol < USBLP_FIRST_PROTOCOL || protocol > USBLP_LAST_PROTOCOL) 1330 1330 return -EINVAL; 1331 1331 1332 - alts = usblp->protocol[protocol].alt_setting; 1333 - if (alts < 0) 1334 - return -EINVAL; 1335 - r = usb_set_interface(usblp->dev, usblp->ifnum, alts); 1336 - if (r < 0) { 1337 - printk(KERN_ERR "usblp: can't set desired altsetting %d on interface %d\n", 1338 - alts, usblp->ifnum); 1339 - return r; 1332 + /* Don't unnecessarily set the interface if there's a single alt. */ 1333 + if (usblp->intf->num_altsetting > 1) { 1334 + alts = usblp->protocol[protocol].alt_setting; 1335 + if (alts < 0) 1336 + return -EINVAL; 1337 + r = usb_set_interface(usblp->dev, usblp->ifnum, alts); 1338 + if (r < 0) { 1339 + printk(KERN_ERR "usblp: can't set desired altsetting %d on interface %d\n", 1340 + alts, usblp->ifnum); 1341 + return r; 1342 + } 1340 1343 } 1341 1344 1342 1345 usblp->bidir = (usblp->protocol[protocol].epread != NULL);
+1 -7
drivers/usb/dwc2/gadget.c
··· 1543 1543 static struct dwc2_hsotg_ep *ep_from_windex(struct dwc2_hsotg *hsotg, 1544 1544 u32 windex) 1545 1545 { 1546 - struct dwc2_hsotg_ep *ep; 1547 1546 int dir = (windex & USB_DIR_IN) ? 1 : 0; 1548 1547 int idx = windex & 0x7F; 1549 1548 ··· 1552 1553 if (idx > hsotg->num_of_eps) 1553 1554 return NULL; 1554 1555 1555 - ep = index_to_ep(hsotg, idx, dir); 1556 - 1557 - if (idx && ep->dir_in != dir) 1558 - return NULL; 1559 - 1560 - return ep; 1556 + return index_to_ep(hsotg, idx, dir); 1561 1557 } 1562 1558 1563 1559 /**
+1 -1
drivers/usb/dwc3/core.c
··· 1758 1758 if (PMSG_IS_AUTO(msg)) 1759 1759 break; 1760 1760 1761 - ret = dwc3_core_init(dwc); 1761 + ret = dwc3_core_init_for_resume(dwc); 1762 1762 if (ret) 1763 1763 return ret; 1764 1764
+3 -1
drivers/usb/gadget/legacy/ether.c
··· 403 403 struct usb_descriptor_header *usb_desc; 404 404 405 405 usb_desc = usb_otg_descriptor_alloc(gadget); 406 - if (!usb_desc) 406 + if (!usb_desc) { 407 + status = -ENOMEM; 407 408 goto fail1; 409 + } 408 410 usb_otg_descriptor_init(gadget, usb_desc); 409 411 otg_desc[0] = usb_desc; 410 412 otg_desc[1] = NULL;
+3 -1
drivers/usb/gadget/udc/aspeed-vhub/hub.c
··· 999 999 str_array[offset].s = NULL; 1000 1000 1001 1001 ret = ast_vhub_str_alloc_add(vhub, &lang_str); 1002 - if (ret) 1002 + if (ret) { 1003 + of_node_put(child); 1003 1004 break; 1005 + } 1004 1006 } 1005 1007 1006 1008 return ret;
+93 -37
drivers/usb/host/xhci-mtk-sch.c
··· 200 200 201 201 sch_ep->sch_tt = tt; 202 202 sch_ep->ep = ep; 203 + INIT_LIST_HEAD(&sch_ep->endpoint); 204 + INIT_LIST_HEAD(&sch_ep->tt_endpoint); 203 205 204 206 return sch_ep; 205 207 } ··· 375 373 sch_ep->bw_budget_table[j]; 376 374 } 377 375 } 376 + sch_ep->allocated = used; 378 377 } 379 378 380 379 static int check_sch_tt(struct usb_device *udev, ··· 544 541 return 0; 545 542 } 546 543 544 + static void destroy_sch_ep(struct usb_device *udev, 545 + struct mu3h_sch_bw_info *sch_bw, struct mu3h_sch_ep_info *sch_ep) 546 + { 547 + /* only release ep bw check passed by check_sch_bw() */ 548 + if (sch_ep->allocated) 549 + update_bus_bw(sch_bw, sch_ep, 0); 550 + 551 + list_del(&sch_ep->endpoint); 552 + 553 + if (sch_ep->sch_tt) { 554 + list_del(&sch_ep->tt_endpoint); 555 + drop_tt(udev); 556 + } 557 + kfree(sch_ep); 558 + } 559 + 547 560 static bool need_bw_sch(struct usb_host_endpoint *ep, 548 561 enum usb_device_speed speed, int has_tt) 549 562 { ··· 602 583 603 584 mtk->sch_array = sch_array; 604 585 586 + INIT_LIST_HEAD(&mtk->bw_ep_chk_list); 587 + 605 588 return 0; 606 589 } 607 590 EXPORT_SYMBOL_GPL(xhci_mtk_sch_init); ··· 622 601 struct xhci_ep_ctx *ep_ctx; 623 602 struct xhci_slot_ctx *slot_ctx; 624 603 struct xhci_virt_device *virt_dev; 625 - struct mu3h_sch_bw_info *sch_bw; 626 604 struct mu3h_sch_ep_info *sch_ep; 627 - struct mu3h_sch_bw_info *sch_array; 628 605 unsigned int ep_index; 629 - int bw_index; 630 - int ret = 0; 631 606 632 607 xhci = hcd_to_xhci(hcd); 633 608 virt_dev = xhci->devs[udev->slot_id]; 634 609 ep_index = xhci_get_endpoint_index(&ep->desc); 635 610 slot_ctx = xhci_get_slot_ctx(xhci, virt_dev->in_ctx); 636 611 ep_ctx = xhci_get_ep_ctx(xhci, virt_dev->in_ctx, ep_index); 637 - sch_array = mtk->sch_array; 638 612 639 613 xhci_dbg(xhci, "%s() type:%d, speed:%d, mpkt:%d, dir:%d, ep:%p\n", 640 614 __func__, usb_endpoint_type(&ep->desc), udev->speed, ··· 648 632 return 0; 649 633 } 650 634 651 - bw_index = get_bw_index(xhci, udev, ep); 652 - sch_bw = &sch_array[bw_index]; 653 - 654 635 sch_ep = create_sch_ep(udev, ep, ep_ctx); 655 636 if (IS_ERR_OR_NULL(sch_ep)) 656 637 return -ENOMEM; 657 638 658 639 setup_sch_info(udev, ep_ctx, sch_ep); 659 640 660 - ret = check_sch_bw(udev, sch_bw, sch_ep); 661 - if (ret) { 662 - xhci_err(xhci, "Not enough bandwidth!\n"); 663 - if (is_fs_or_ls(udev->speed)) 664 - drop_tt(udev); 665 - 666 - kfree(sch_ep); 667 - return -ENOSPC; 668 - } 669 - 670 - list_add_tail(&sch_ep->endpoint, &sch_bw->bw_ep_list); 671 - 672 - ep_ctx->reserved[0] |= cpu_to_le32(EP_BPKTS(sch_ep->pkts) 673 - | EP_BCSCOUNT(sch_ep->cs_count) | EP_BBM(sch_ep->burst_mode)); 674 - ep_ctx->reserved[1] |= cpu_to_le32(EP_BOFFSET(sch_ep->offset) 675 - | EP_BREPEAT(sch_ep->repeat)); 676 - 677 - xhci_dbg(xhci, " PKTS:%x, CSCOUNT:%x, BM:%x, OFFSET:%x, REPEAT:%x\n", 678 - sch_ep->pkts, sch_ep->cs_count, sch_ep->burst_mode, 679 - sch_ep->offset, sch_ep->repeat); 641 + list_add_tail(&sch_ep->endpoint, &mtk->bw_ep_chk_list); 680 642 681 643 return 0; 682 644 } ··· 669 675 struct xhci_virt_device *virt_dev; 670 676 struct mu3h_sch_bw_info *sch_array; 671 677 struct mu3h_sch_bw_info *sch_bw; 672 - struct mu3h_sch_ep_info *sch_ep; 678 + struct mu3h_sch_ep_info *sch_ep, *tmp; 673 679 int bw_index; 674 680 675 681 xhci = hcd_to_xhci(hcd); ··· 688 694 bw_index = get_bw_index(xhci, udev, ep); 689 695 sch_bw = &sch_array[bw_index]; 690 696 691 - list_for_each_entry(sch_ep, &sch_bw->bw_ep_list, endpoint) { 697 + list_for_each_entry_safe(sch_ep, tmp, &sch_bw->bw_ep_list, endpoint) { 692 698 if (sch_ep->ep == ep) { 693 - update_bus_bw(sch_bw, sch_ep, 0); 694 - list_del(&sch_ep->endpoint); 695 - if (is_fs_or_ls(udev->speed)) { 696 - list_del(&sch_ep->tt_endpoint); 697 - drop_tt(udev); 698 - } 699 - kfree(sch_ep); 699 + destroy_sch_ep(udev, sch_bw, sch_ep); 700 700 break; 701 701 } 702 702 } 703 703 } 704 704 EXPORT_SYMBOL_GPL(xhci_mtk_drop_ep_quirk); 705 + 706 + int xhci_mtk_check_bandwidth(struct usb_hcd *hcd, struct usb_device *udev) 707 + { 708 + struct xhci_hcd_mtk *mtk = hcd_to_mtk(hcd); 709 + struct xhci_hcd *xhci = hcd_to_xhci(hcd); 710 + struct xhci_virt_device *virt_dev = xhci->devs[udev->slot_id]; 711 + struct mu3h_sch_bw_info *sch_bw; 712 + struct mu3h_sch_ep_info *sch_ep, *tmp; 713 + int bw_index, ret; 714 + 715 + xhci_dbg(xhci, "%s() udev %s\n", __func__, dev_name(&udev->dev)); 716 + 717 + list_for_each_entry(sch_ep, &mtk->bw_ep_chk_list, endpoint) { 718 + bw_index = get_bw_index(xhci, udev, sch_ep->ep); 719 + sch_bw = &mtk->sch_array[bw_index]; 720 + 721 + ret = check_sch_bw(udev, sch_bw, sch_ep); 722 + if (ret) { 723 + xhci_err(xhci, "Not enough bandwidth!\n"); 724 + return -ENOSPC; 725 + } 726 + } 727 + 728 + list_for_each_entry_safe(sch_ep, tmp, &mtk->bw_ep_chk_list, endpoint) { 729 + struct xhci_ep_ctx *ep_ctx; 730 + struct usb_host_endpoint *ep = sch_ep->ep; 731 + unsigned int ep_index = xhci_get_endpoint_index(&ep->desc); 732 + 733 + bw_index = get_bw_index(xhci, udev, ep); 734 + sch_bw = &mtk->sch_array[bw_index]; 735 + 736 + list_move_tail(&sch_ep->endpoint, &sch_bw->bw_ep_list); 737 + 738 + ep_ctx = xhci_get_ep_ctx(xhci, virt_dev->in_ctx, ep_index); 739 + ep_ctx->reserved[0] |= cpu_to_le32(EP_BPKTS(sch_ep->pkts) 740 + | EP_BCSCOUNT(sch_ep->cs_count) 741 + | EP_BBM(sch_ep->burst_mode)); 742 + ep_ctx->reserved[1] |= cpu_to_le32(EP_BOFFSET(sch_ep->offset) 743 + | EP_BREPEAT(sch_ep->repeat)); 744 + 745 + xhci_dbg(xhci, " PKTS:%x, CSCOUNT:%x, BM:%x, OFFSET:%x, REPEAT:%x\n", 746 + sch_ep->pkts, sch_ep->cs_count, sch_ep->burst_mode, 747 + sch_ep->offset, sch_ep->repeat); 748 + } 749 + 750 + return xhci_check_bandwidth(hcd, udev); 751 + } 752 + EXPORT_SYMBOL_GPL(xhci_mtk_check_bandwidth); 753 + 754 + void xhci_mtk_reset_bandwidth(struct usb_hcd *hcd, struct usb_device *udev) 755 + { 756 + struct xhci_hcd_mtk *mtk = hcd_to_mtk(hcd); 757 + struct xhci_hcd *xhci = hcd_to_xhci(hcd); 758 + struct mu3h_sch_bw_info *sch_bw; 759 + struct mu3h_sch_ep_info *sch_ep, *tmp; 760 + int bw_index; 761 + 762 + xhci_dbg(xhci, "%s() udev %s\n", __func__, dev_name(&udev->dev)); 763 + 764 + list_for_each_entry_safe(sch_ep, tmp, &mtk->bw_ep_chk_list, endpoint) { 765 + bw_index = get_bw_index(xhci, udev, sch_ep->ep); 766 + sch_bw = &mtk->sch_array[bw_index]; 767 + destroy_sch_ep(udev, sch_bw, sch_ep); 768 + } 769 + 770 + xhci_reset_bandwidth(hcd, udev); 771 + } 772 + EXPORT_SYMBOL_GPL(xhci_mtk_reset_bandwidth);
+2
drivers/usb/host/xhci-mtk.c
··· 347 347 static int xhci_mtk_setup(struct usb_hcd *hcd); 348 348 static const struct xhci_driver_overrides xhci_mtk_overrides __initconst = { 349 349 .reset = xhci_mtk_setup, 350 + .check_bandwidth = xhci_mtk_check_bandwidth, 351 + .reset_bandwidth = xhci_mtk_reset_bandwidth, 350 352 }; 351 353 352 354 static struct hc_driver __read_mostly xhci_mtk_hc_driver;
+15
drivers/usb/host/xhci-mtk.h
··· 59 59 * @ep_type: endpoint type 60 60 * @maxpkt: max packet size of endpoint 61 61 * @ep: address of usb_host_endpoint struct 62 + * @allocated: the bandwidth is aready allocated from bus_bw 62 63 * @offset: which uframe of the interval that transfer should be 63 64 * scheduled first time within the interval 64 65 * @repeat: the time gap between two uframes that transfers are ··· 87 86 u32 ep_type; 88 87 u32 maxpkt; 89 88 void *ep; 89 + bool allocated; 90 90 /* 91 91 * mtk xHCI scheduling information put into reserved DWs 92 92 * in ep context ··· 133 131 struct device *dev; 134 132 struct usb_hcd *hcd; 135 133 struct mu3h_sch_bw_info *sch_array; 134 + struct list_head bw_ep_chk_list; 136 135 struct mu3c_ippc_regs __iomem *ippc_regs; 137 136 bool has_ippc; 138 137 int num_u2_ports; ··· 169 166 struct usb_host_endpoint *ep); 170 167 void xhci_mtk_drop_ep_quirk(struct usb_hcd *hcd, struct usb_device *udev, 171 168 struct usb_host_endpoint *ep); 169 + int xhci_mtk_check_bandwidth(struct usb_hcd *hcd, struct usb_device *udev); 170 + void xhci_mtk_reset_bandwidth(struct usb_hcd *hcd, struct usb_device *udev); 172 171 173 172 #else 174 173 static inline int xhci_mtk_add_ep_quirk(struct usb_hcd *hcd, ··· 184 179 { 185 180 } 186 181 182 + static inline int xhci_mtk_check_bandwidth(struct usb_hcd *hcd, 183 + struct usb_device *udev) 184 + { 185 + return 0; 186 + } 187 + 188 + static inline void xhci_mtk_reset_bandwidth(struct usb_hcd *hcd, 189 + struct usb_device *udev) 190 + { 191 + } 187 192 #endif 188 193 189 194 #endif /* _XHCI_MTK_H_ */
+42
drivers/usb/host/xhci-mvebu.c
··· 8 8 #include <linux/mbus.h> 9 9 #include <linux/of.h> 10 10 #include <linux/platform_device.h> 11 + #include <linux/phy/phy.h> 11 12 12 13 #include <linux/usb.h> 13 14 #include <linux/usb/hcd.h> ··· 71 70 * windows, and is therefore no longer useful. 72 71 */ 73 72 iounmap(base); 73 + 74 + return 0; 75 + } 76 + 77 + int xhci_mvebu_a3700_plat_setup(struct usb_hcd *hcd) 78 + { 79 + struct xhci_hcd *xhci = hcd_to_xhci(hcd); 80 + struct device *dev = hcd->self.controller; 81 + struct phy *phy; 82 + int ret; 83 + 84 + /* Old bindings miss the PHY handle */ 85 + phy = of_phy_get(dev->of_node, "usb3-phy"); 86 + if (IS_ERR(phy) && PTR_ERR(phy) == -EPROBE_DEFER) 87 + return -EPROBE_DEFER; 88 + else if (IS_ERR(phy)) 89 + goto phy_out; 90 + 91 + ret = phy_init(phy); 92 + if (ret) 93 + goto phy_put; 94 + 95 + ret = phy_set_mode(phy, PHY_MODE_USB_HOST_SS); 96 + if (ret) 97 + goto phy_exit; 98 + 99 + ret = phy_power_on(phy); 100 + if (ret == -EOPNOTSUPP) { 101 + /* Skip initializatin of XHCI PHY when it is unsupported by firmware */ 102 + dev_warn(dev, "PHY unsupported by firmware\n"); 103 + xhci->quirks |= XHCI_SKIP_PHY_INIT; 104 + } 105 + if (ret) 106 + goto phy_exit; 107 + 108 + phy_power_off(phy); 109 + phy_exit: 110 + phy_exit(phy); 111 + phy_put: 112 + of_phy_put(phy); 113 + phy_out: 74 114 75 115 return 0; 76 116 }
+6
drivers/usb/host/xhci-mvebu.h
··· 12 12 13 13 #if IS_ENABLED(CONFIG_USB_XHCI_MVEBU) 14 14 int xhci_mvebu_mbus_init_quirk(struct usb_hcd *hcd); 15 + int xhci_mvebu_a3700_plat_setup(struct usb_hcd *hcd); 15 16 int xhci_mvebu_a3700_init_quirk(struct usb_hcd *hcd); 16 17 #else 17 18 static inline int xhci_mvebu_mbus_init_quirk(struct usb_hcd *hcd) 19 + { 20 + return 0; 21 + } 22 + 23 + static inline int xhci_mvebu_a3700_plat_setup(struct usb_hcd *hcd) 18 24 { 19 25 return 0; 20 26 }
+19 -1
drivers/usb/host/xhci-plat.c
··· 44 44 priv->plat_start(hcd); 45 45 } 46 46 47 + static int xhci_priv_plat_setup(struct usb_hcd *hcd) 48 + { 49 + struct xhci_plat_priv *priv = hcd_to_xhci_priv(hcd); 50 + 51 + if (!priv->plat_setup) 52 + return 0; 53 + 54 + return priv->plat_setup(hcd); 55 + } 56 + 47 57 static int xhci_priv_init_quirk(struct usb_hcd *hcd) 48 58 { 49 59 struct xhci_plat_priv *priv = hcd_to_xhci_priv(hcd); ··· 121 111 }; 122 112 123 113 static const struct xhci_plat_priv xhci_plat_marvell_armada3700 = { 114 + .plat_setup = xhci_mvebu_a3700_plat_setup, 124 115 .init_quirk = xhci_mvebu_a3700_init_quirk, 125 116 }; 126 117 ··· 341 330 342 331 hcd->tpl_support = of_usb_host_tpl_support(sysdev->of_node); 343 332 xhci->shared_hcd->tpl_support = hcd->tpl_support; 344 - if (priv && (priv->quirks & XHCI_SKIP_PHY_INIT)) 333 + 334 + if (priv) { 335 + ret = xhci_priv_plat_setup(hcd); 336 + if (ret) 337 + goto disable_usb_phy; 338 + } 339 + 340 + if ((xhci->quirks & XHCI_SKIP_PHY_INIT) || (priv && (priv->quirks & XHCI_SKIP_PHY_INIT))) 345 341 hcd->skip_phy_initialization = 1; 346 342 347 343 if (priv && (priv->quirks & XHCI_SG_TRB_CACHE_SIZE_QUIRK))
+1
drivers/usb/host/xhci-plat.h
··· 13 13 struct xhci_plat_priv { 14 14 const char *firmware_name; 15 15 unsigned long long quirks; 16 + int (*plat_setup)(struct usb_hcd *); 16 17 void (*plat_start)(struct usb_hcd *); 17 18 int (*init_quirk)(struct usb_hcd *); 18 19 int (*suspend_quirk)(struct usb_hcd *);
+20 -11
drivers/usb/host/xhci-ring.c
··· 699 699 dma_unmap_single(dev, seg->bounce_dma, ring->bounce_buf_len, 700 700 DMA_FROM_DEVICE); 701 701 /* for in tranfers we need to copy the data from bounce to sg */ 702 - len = sg_pcopy_from_buffer(urb->sg, urb->num_sgs, seg->bounce_buf, 703 - seg->bounce_len, seg->bounce_offs); 704 - if (len != seg->bounce_len) 705 - xhci_warn(xhci, "WARN Wrong bounce buffer read length: %zu != %d\n", 706 - len, seg->bounce_len); 702 + if (urb->num_sgs) { 703 + len = sg_pcopy_from_buffer(urb->sg, urb->num_sgs, seg->bounce_buf, 704 + seg->bounce_len, seg->bounce_offs); 705 + if (len != seg->bounce_len) 706 + xhci_warn(xhci, "WARN Wrong bounce buffer read length: %zu != %d\n", 707 + len, seg->bounce_len); 708 + } else { 709 + memcpy(urb->transfer_buffer + seg->bounce_offs, seg->bounce_buf, 710 + seg->bounce_len); 711 + } 707 712 seg->bounce_len = 0; 708 713 seg->bounce_offs = 0; 709 714 } ··· 3282 3277 3283 3278 /* create a max max_pkt sized bounce buffer pointed to by last trb */ 3284 3279 if (usb_urb_dir_out(urb)) { 3285 - len = sg_pcopy_to_buffer(urb->sg, urb->num_sgs, 3286 - seg->bounce_buf, new_buff_len, enqd_len); 3287 - if (len != new_buff_len) 3288 - xhci_warn(xhci, 3289 - "WARN Wrong bounce buffer write length: %zu != %d\n", 3290 - len, new_buff_len); 3280 + if (urb->num_sgs) { 3281 + len = sg_pcopy_to_buffer(urb->sg, urb->num_sgs, 3282 + seg->bounce_buf, new_buff_len, enqd_len); 3283 + if (len != new_buff_len) 3284 + xhci_warn(xhci, "WARN Wrong bounce buffer write length: %zu != %d\n", 3285 + len, new_buff_len); 3286 + } else { 3287 + memcpy(seg->bounce_buf, urb->transfer_buffer + enqd_len, new_buff_len); 3288 + } 3289 + 3291 3290 seg->bounce_dma = dma_map_single(dev, seg->bounce_buf, 3292 3291 max_pkt, DMA_TO_DEVICE); 3293 3292 } else {
+6 -2
drivers/usb/host/xhci.c
··· 2985 2985 * else should be touching the xhci->devs[slot_id] structure, so we 2986 2986 * don't need to take the xhci->lock for manipulating that. 2987 2987 */ 2988 - static int xhci_check_bandwidth(struct usb_hcd *hcd, struct usb_device *udev) 2988 + int xhci_check_bandwidth(struct usb_hcd *hcd, struct usb_device *udev) 2989 2989 { 2990 2990 int i; 2991 2991 int ret = 0; ··· 3083 3083 return ret; 3084 3084 } 3085 3085 3086 - static void xhci_reset_bandwidth(struct usb_hcd *hcd, struct usb_device *udev) 3086 + void xhci_reset_bandwidth(struct usb_hcd *hcd, struct usb_device *udev) 3087 3087 { 3088 3088 struct xhci_hcd *xhci; 3089 3089 struct xhci_virt_device *virt_dev; ··· 5510 5510 drv->reset = over->reset; 5511 5511 if (over->start) 5512 5512 drv->start = over->start; 5513 + if (over->check_bandwidth) 5514 + drv->check_bandwidth = over->check_bandwidth; 5515 + if (over->reset_bandwidth) 5516 + drv->reset_bandwidth = over->reset_bandwidth; 5513 5517 } 5514 5518 } 5515 5519 EXPORT_SYMBOL_GPL(xhci_init_driver);
+4
drivers/usb/host/xhci.h
··· 1920 1920 size_t extra_priv_size; 1921 1921 int (*reset)(struct usb_hcd *hcd); 1922 1922 int (*start)(struct usb_hcd *hcd); 1923 + int (*check_bandwidth)(struct usb_hcd *, struct usb_device *); 1924 + void (*reset_bandwidth)(struct usb_hcd *, struct usb_device *); 1923 1925 }; 1924 1926 1925 1927 #define XHCI_CFC_DELAY 10 ··· 2076 2074 void xhci_shutdown(struct usb_hcd *hcd); 2077 2075 void xhci_init_driver(struct hc_driver *drv, 2078 2076 const struct xhci_driver_overrides *over); 2077 + int xhci_check_bandwidth(struct usb_hcd *hcd, struct usb_device *udev); 2078 + void xhci_reset_bandwidth(struct usb_hcd *hcd, struct usb_device *udev); 2079 2079 int xhci_disable_slot(struct xhci_hcd *xhci, u32 slot_id); 2080 2080 int xhci_ext_cap_init(struct xhci_hcd *xhci); 2081 2081
+1
drivers/usb/renesas_usbhs/fifo.c
··· 126 126 } 127 127 128 128 usbhs_pipe_clear_without_sequence(pipe, 0, 0); 129 + usbhs_pipe_running(pipe, 0); 129 130 130 131 __usbhsf_pkt_del(pkt); 131 132 }
+2
drivers/usb/serial/cp210x.c
··· 61 61 { USB_DEVICE(0x08e6, 0x5501) }, /* Gemalto Prox-PU/CU contactless smartcard reader */ 62 62 { USB_DEVICE(0x08FD, 0x000A) }, /* Digianswer A/S , ZigBee/802.15.4 MAC Device */ 63 63 { USB_DEVICE(0x0908, 0x01FF) }, /* Siemens RUGGEDCOM USB Serial Console */ 64 + { USB_DEVICE(0x0988, 0x0578) }, /* Teraoka AD2000 */ 64 65 { USB_DEVICE(0x0B00, 0x3070) }, /* Ingenico 3070 */ 65 66 { USB_DEVICE(0x0BED, 0x1100) }, /* MEI (TM) Cashflow-SC Bill/Voucher Acceptor */ 66 67 { USB_DEVICE(0x0BED, 0x1101) }, /* MEI series 2000 Combo Acceptor */ ··· 202 201 { USB_DEVICE(0x1901, 0x0194) }, /* GE Healthcare Remote Alarm Box */ 203 202 { USB_DEVICE(0x1901, 0x0195) }, /* GE B850/B650/B450 CP2104 DP UART interface */ 204 203 { USB_DEVICE(0x1901, 0x0196) }, /* GE B850 CP2105 DP UART interface */ 204 + { USB_DEVICE(0x199B, 0xBA30) }, /* LORD WSDA-200-USB */ 205 205 { USB_DEVICE(0x19CF, 0x3000) }, /* Parrot NMEA GPS Flight Recorder */ 206 206 { USB_DEVICE(0x1ADB, 0x0001) }, /* Schweitzer Engineering C662 Cable */ 207 207 { USB_DEVICE(0x1B1C, 0x1C00) }, /* Corsair USB Dongle */
+6
drivers/usb/serial/option.c
··· 425 425 #define CINTERION_PRODUCT_AHXX_2RMNET 0x0084 426 426 #define CINTERION_PRODUCT_AHXX_AUDIO 0x0085 427 427 #define CINTERION_PRODUCT_CLS8 0x00b0 428 + #define CINTERION_PRODUCT_MV31_MBIM 0x00b3 429 + #define CINTERION_PRODUCT_MV31_RMNET 0x00b7 428 430 429 431 /* Olivetti products */ 430 432 #define OLIVETTI_VENDOR_ID 0x0b3c ··· 1916 1914 { USB_DEVICE(SIEMENS_VENDOR_ID, CINTERION_PRODUCT_HC25_MDMNET) }, 1917 1915 { USB_DEVICE(SIEMENS_VENDOR_ID, CINTERION_PRODUCT_HC28_MDM) }, /* HC28 enumerates with Siemens or Cinterion VID depending on FW revision */ 1918 1916 { USB_DEVICE(SIEMENS_VENDOR_ID, CINTERION_PRODUCT_HC28_MDMNET) }, 1917 + { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_MV31_MBIM, 0xff), 1918 + .driver_info = RSVD(3)}, 1919 + { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_MV31_RMNET, 0xff), 1920 + .driver_info = RSVD(0)}, 1919 1921 { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD100), 1920 1922 .driver_info = RSVD(4) }, 1921 1923 { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD120),