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.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB driver fixes from Greg KH:
"Here are some USB driver fixes and new device ids for 5.15-rc3.

They include:

- usb-storage quirk additions

- usb-serial new device ids

- usb-serial driver fixes

- USB roothub registration bugfix to resolve a long-reported issue

- usb gadget driver fixes for a large number of small things

- dwc2 driver fixes

All of these have been in linux-next for a while with no reported
issues"

* tag 'usb-5.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (28 commits)
USB: serial: option: add device id for Foxconn T99W265
USB: serial: cp210x: add ID for GW Instek GDM-834x Digital Multimeter
USB: serial: cp210x: add part-number debug printk
USB: serial: cp210x: fix dropped characters with CP2102
MAINTAINERS: usb, update Peter Korsgaard's entries
usb: musb: tusb6010: uninitialized data in tusb_fifo_write_unaligned()
usb-storage: Add quirk for ScanLogic SL11R-IDE older than 2.6c
Re-enable UAS for LaCie Rugged USB3-FW with fk quirk
USB: serial: option: remove duplicate USB device ID
USB: serial: mos7840: remove duplicated 0xac24 device ID
arm64: dts: qcom: ipq8074: remove USB tx-fifo-resize property
usb: gadget: f_uac2: Populate SS descriptors' wBytesPerInterval
usb: gadget: f_uac2: Add missing companion descriptor for feedback EP
usb: dwc2: gadget: Fix ISOC transfer complete handling for DDMA
usb: core: hcd: Modularize HCD stop configuration in usb_stop_hcd()
xhci: Set HCD flag to defer primary roothub registration
usb: core: hcd: Add support for deferring roothub registration
usb: dwc2: gadget: Fix ISOC flow for BDMA and Slave
usb: dwc3: core: balance phy init and exit
Revert "USB: bcma: Add a check for devm_gpiod_get"
...

+320 -203
+2 -3
MAINTAINERS
··· 19288 19288 F: drivers/usb/misc/chaoskey.c 19289 19289 19290 19290 USB CYPRESS C67X00 DRIVER 19291 - M: Peter Korsgaard <jacmet@sunsite.dk> 19292 19291 L: linux-usb@vger.kernel.org 19293 - S: Maintained 19292 + S: Orphan 19294 19293 F: drivers/usb/c67x00/ 19295 19294 19296 19295 USB DAVICOM DM9601 DRIVER 19297 - M: Peter Korsgaard <jacmet@sunsite.dk> 19296 + M: Peter Korsgaard <peter@korsgaard.com> 19298 19297 L: netdev@vger.kernel.org 19299 19298 S: Maintained 19300 19299 W: http://www.linux-usb.org/usbnet
-2
arch/arm64/boot/dts/qcom/ipq8074.dtsi
··· 487 487 interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>; 488 488 phys = <&qusb_phy_0>, <&usb0_ssphy>; 489 489 phy-names = "usb2-phy", "usb3-phy"; 490 - tx-fifo-resize; 491 490 snps,is-utmi-l1-suspend; 492 491 snps,hird-threshold = /bits/ 8 <0x0>; 493 492 snps,dis_u2_susphy_quirk; ··· 527 528 interrupts = <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>; 528 529 phys = <&qusb_phy_1>, <&usb1_ssphy>; 529 530 phy-names = "usb2-phy", "usb3-phy"; 530 - tx-fifo-resize; 531 531 snps,is-utmi-l1-suspend; 532 532 snps,hird-threshold = /bits/ 8 <0x0>; 533 533 snps,dis_u2_susphy_quirk;
+14
drivers/usb/cdns3/cdns3-gadget.c
··· 1100 1100 return 0; 1101 1101 } 1102 1102 1103 + static void cdns3_rearm_drdy_if_needed(struct cdns3_endpoint *priv_ep) 1104 + { 1105 + struct cdns3_device *priv_dev = priv_ep->cdns3_dev; 1106 + 1107 + if (priv_dev->dev_ver < DEV_VER_V3) 1108 + return; 1109 + 1110 + if (readl(&priv_dev->regs->ep_sts) & EP_STS_TRBERR) { 1111 + writel(EP_STS_TRBERR, &priv_dev->regs->ep_sts); 1112 + writel(EP_CMD_DRDY, &priv_dev->regs->ep_cmd); 1113 + } 1114 + } 1115 + 1103 1116 /** 1104 1117 * cdns3_ep_run_transfer - start transfer on no-default endpoint hardware 1105 1118 * @priv_ep: endpoint object ··· 1364 1351 /*clearing TRBERR and EP_STS_DESCMIS before seting DRDY*/ 1365 1352 writel(EP_STS_TRBERR | EP_STS_DESCMIS, &priv_dev->regs->ep_sts); 1366 1353 writel(EP_CMD_DRDY, &priv_dev->regs->ep_cmd); 1354 + cdns3_rearm_drdy_if_needed(priv_ep); 1367 1355 trace_cdns3_doorbell_epx(priv_ep->name, 1368 1356 readl(&priv_dev->regs->ep_traddr)); 1369 1357 }
+5 -2
drivers/usb/class/cdc-acm.c
··· 726 726 { 727 727 struct acm *acm = container_of(port, struct acm, port); 728 728 729 - acm_release_minor(acm); 729 + if (acm->minor != ACM_MINOR_INVALID) 730 + acm_release_minor(acm); 730 731 usb_put_intf(acm->control); 731 732 kfree(acm->country_codes); 732 733 kfree(acm); ··· 1324 1323 usb_get_intf(acm->control); /* undone in destruct() */ 1325 1324 1326 1325 minor = acm_alloc_minor(acm); 1327 - if (minor < 0) 1326 + if (minor < 0) { 1327 + acm->minor = ACM_MINOR_INVALID; 1328 1328 goto err_put_port; 1329 + } 1329 1330 1330 1331 acm->minor = minor; 1331 1332 acm->dev = usb_dev;
+2
drivers/usb/class/cdc-acm.h
··· 22 22 #define ACM_TTY_MAJOR 166 23 23 #define ACM_TTY_MINORS 256 24 24 25 + #define ACM_MINOR_INVALID ACM_TTY_MINORS 26 + 25 27 /* 26 28 * Requests. 27 29 */
+46 -24
drivers/usb/core/hcd.c
··· 2761 2761 } 2762 2762 2763 2763 /** 2764 + * usb_stop_hcd - Halt the HCD 2765 + * @hcd: the usb_hcd that has to be halted 2766 + * 2767 + * Stop the root-hub polling timer and invoke the HCD's ->stop callback. 2768 + */ 2769 + static void usb_stop_hcd(struct usb_hcd *hcd) 2770 + { 2771 + hcd->rh_pollable = 0; 2772 + clear_bit(HCD_FLAG_POLL_RH, &hcd->flags); 2773 + del_timer_sync(&hcd->rh_timer); 2774 + 2775 + hcd->driver->stop(hcd); 2776 + hcd->state = HC_STATE_HALT; 2777 + 2778 + /* In case the HCD restarted the timer, stop it again. */ 2779 + clear_bit(HCD_FLAG_POLL_RH, &hcd->flags); 2780 + del_timer_sync(&hcd->rh_timer); 2781 + } 2782 + 2783 + /** 2764 2784 * usb_add_hcd - finish generic HCD structure initialization and register 2765 2785 * @hcd: the usb_hcd structure to initialize 2766 2786 * @irqnum: Interrupt line to allocate ··· 2795 2775 { 2796 2776 int retval; 2797 2777 struct usb_device *rhdev; 2778 + struct usb_hcd *shared_hcd; 2798 2779 2799 2780 if (!hcd->skip_phy_initialization && usb_hcd_is_primary_hcd(hcd)) { 2800 2781 hcd->phy_roothub = usb_phy_roothub_alloc(hcd->self.sysdev); ··· 2956 2935 goto err_hcd_driver_start; 2957 2936 } 2958 2937 2959 - /* starting here, usbcore will pay attention to this root hub */ 2960 - retval = register_root_hub(hcd); 2961 - if (retval != 0) 2962 - goto err_register_root_hub; 2938 + /* starting here, usbcore will pay attention to the shared HCD roothub */ 2939 + shared_hcd = hcd->shared_hcd; 2940 + if (!usb_hcd_is_primary_hcd(hcd) && shared_hcd && HCD_DEFER_RH_REGISTER(shared_hcd)) { 2941 + retval = register_root_hub(shared_hcd); 2942 + if (retval != 0) 2943 + goto err_register_root_hub; 2963 2944 2964 - if (hcd->uses_new_polling && HCD_POLL_RH(hcd)) 2965 - usb_hcd_poll_rh_status(hcd); 2945 + if (shared_hcd->uses_new_polling && HCD_POLL_RH(shared_hcd)) 2946 + usb_hcd_poll_rh_status(shared_hcd); 2947 + } 2948 + 2949 + /* starting here, usbcore will pay attention to this root hub */ 2950 + if (!HCD_DEFER_RH_REGISTER(hcd)) { 2951 + retval = register_root_hub(hcd); 2952 + if (retval != 0) 2953 + goto err_register_root_hub; 2954 + 2955 + if (hcd->uses_new_polling && HCD_POLL_RH(hcd)) 2956 + usb_hcd_poll_rh_status(hcd); 2957 + } 2966 2958 2967 2959 return retval; 2968 2960 2969 2961 err_register_root_hub: 2970 - hcd->rh_pollable = 0; 2971 - clear_bit(HCD_FLAG_POLL_RH, &hcd->flags); 2972 - del_timer_sync(&hcd->rh_timer); 2973 - hcd->driver->stop(hcd); 2974 - hcd->state = HC_STATE_HALT; 2975 - clear_bit(HCD_FLAG_POLL_RH, &hcd->flags); 2976 - del_timer_sync(&hcd->rh_timer); 2962 + usb_stop_hcd(hcd); 2977 2963 err_hcd_driver_start: 2978 2964 if (usb_hcd_is_primary_hcd(hcd) && hcd->irq > 0) 2979 2965 free_irq(irqnum, hcd); ··· 3013 2985 void usb_remove_hcd(struct usb_hcd *hcd) 3014 2986 { 3015 2987 struct usb_device *rhdev = hcd->self.root_hub; 2988 + bool rh_registered; 3016 2989 3017 2990 dev_info(hcd->self.controller, "remove, state %x\n", hcd->state); 3018 2991 ··· 3024 2995 3025 2996 dev_dbg(hcd->self.controller, "roothub graceful disconnect\n"); 3026 2997 spin_lock_irq (&hcd_root_hub_lock); 2998 + rh_registered = hcd->rh_registered; 3027 2999 hcd->rh_registered = 0; 3028 3000 spin_unlock_irq (&hcd_root_hub_lock); 3029 3001 ··· 3034 3004 cancel_work_sync(&hcd->died_work); 3035 3005 3036 3006 mutex_lock(&usb_bus_idr_lock); 3037 - usb_disconnect(&rhdev); /* Sets rhdev to NULL */ 3007 + if (rh_registered) 3008 + usb_disconnect(&rhdev); /* Sets rhdev to NULL */ 3038 3009 mutex_unlock(&usb_bus_idr_lock); 3039 3010 3040 3011 /* ··· 3053 3022 * interrupt occurs), but usb_hcd_poll_rh_status() won't invoke 3054 3023 * the hub_status_data() callback. 3055 3024 */ 3056 - hcd->rh_pollable = 0; 3057 - clear_bit(HCD_FLAG_POLL_RH, &hcd->flags); 3058 - del_timer_sync(&hcd->rh_timer); 3059 - 3060 - hcd->driver->stop(hcd); 3061 - hcd->state = HC_STATE_HALT; 3062 - 3063 - /* In case the HCD restarted the timer, stop it again. */ 3064 - clear_bit(HCD_FLAG_POLL_RH, &hcd->flags); 3065 - del_timer_sync(&hcd->rh_timer); 3025 + usb_stop_hcd(hcd); 3066 3026 3067 3027 if (usb_hcd_is_primary_hcd(hcd)) { 3068 3028 if (hcd->irq > 0)
+108 -87
drivers/usb/dwc2/gadget.c
··· 115 115 */ 116 116 static inline void dwc2_gadget_incr_frame_num(struct dwc2_hsotg_ep *hs_ep) 117 117 { 118 + struct dwc2_hsotg *hsotg = hs_ep->parent; 119 + u16 limit = DSTS_SOFFN_LIMIT; 120 + 121 + if (hsotg->gadget.speed != USB_SPEED_HIGH) 122 + limit >>= 3; 123 + 118 124 hs_ep->target_frame += hs_ep->interval; 119 - if (hs_ep->target_frame > DSTS_SOFFN_LIMIT) { 125 + if (hs_ep->target_frame > limit) { 120 126 hs_ep->frame_overrun = true; 121 - hs_ep->target_frame &= DSTS_SOFFN_LIMIT; 127 + hs_ep->target_frame &= limit; 122 128 } else { 123 129 hs_ep->frame_overrun = false; 124 130 } ··· 142 136 */ 143 137 static inline void dwc2_gadget_dec_frame_num_by_one(struct dwc2_hsotg_ep *hs_ep) 144 138 { 139 + struct dwc2_hsotg *hsotg = hs_ep->parent; 140 + u16 limit = DSTS_SOFFN_LIMIT; 141 + 142 + if (hsotg->gadget.speed != USB_SPEED_HIGH) 143 + limit >>= 3; 144 + 145 145 if (hs_ep->target_frame) 146 146 hs_ep->target_frame -= 1; 147 147 else 148 - hs_ep->target_frame = DSTS_SOFFN_LIMIT; 148 + hs_ep->target_frame = limit; 149 149 } 150 150 151 151 /** ··· 1030 1018 dwc2_writel(hsotg, ctrl, depctl); 1031 1019 } 1032 1020 1021 + static bool dwc2_gadget_target_frame_elapsed(struct dwc2_hsotg_ep *hs_ep); 1022 + static void dwc2_hsotg_complete_request(struct dwc2_hsotg *hsotg, 1023 + struct dwc2_hsotg_ep *hs_ep, 1024 + struct dwc2_hsotg_req *hs_req, 1025 + int result); 1026 + 1033 1027 /** 1034 1028 * dwc2_hsotg_start_req - start a USB request from an endpoint's queue 1035 1029 * @hsotg: The controller state. ··· 1188 1170 } 1189 1171 } 1190 1172 1191 - if (hs_ep->isochronous && hs_ep->interval == 1) { 1192 - hs_ep->target_frame = dwc2_hsotg_read_frameno(hsotg); 1193 - dwc2_gadget_incr_frame_num(hs_ep); 1194 - 1195 - if (hs_ep->target_frame & 0x1) 1196 - ctrl |= DXEPCTL_SETODDFR; 1197 - else 1198 - ctrl |= DXEPCTL_SETEVENFR; 1173 + if (hs_ep->isochronous) { 1174 + if (!dwc2_gadget_target_frame_elapsed(hs_ep)) { 1175 + if (hs_ep->interval == 1) { 1176 + if (hs_ep->target_frame & 0x1) 1177 + ctrl |= DXEPCTL_SETODDFR; 1178 + else 1179 + ctrl |= DXEPCTL_SETEVENFR; 1180 + } 1181 + ctrl |= DXEPCTL_CNAK; 1182 + } else { 1183 + dwc2_hsotg_complete_request(hsotg, hs_ep, hs_req, -ENODATA); 1184 + return; 1185 + } 1199 1186 } 1200 1187 1201 1188 ctrl |= DXEPCTL_EPENA; /* ensure ep enabled */ ··· 1348 1325 u32 target_frame = hs_ep->target_frame; 1349 1326 u32 current_frame = hsotg->frame_number; 1350 1327 bool frame_overrun = hs_ep->frame_overrun; 1328 + u16 limit = DSTS_SOFFN_LIMIT; 1329 + 1330 + if (hsotg->gadget.speed != USB_SPEED_HIGH) 1331 + limit >>= 3; 1351 1332 1352 1333 if (!frame_overrun && current_frame >= target_frame) 1353 1334 return true; 1354 1335 1355 1336 if (frame_overrun && current_frame >= target_frame && 1356 - ((current_frame - target_frame) < DSTS_SOFFN_LIMIT / 2)) 1337 + ((current_frame - target_frame) < limit / 2)) 1357 1338 return true; 1358 1339 1359 1340 return false; ··· 1740 1713 */ 1741 1714 static void dwc2_gadget_start_next_request(struct dwc2_hsotg_ep *hs_ep) 1742 1715 { 1743 - u32 mask; 1744 1716 struct dwc2_hsotg *hsotg = hs_ep->parent; 1745 1717 int dir_in = hs_ep->dir_in; 1746 1718 struct dwc2_hsotg_req *hs_req; 1747 - u32 epmsk_reg = dir_in ? DIEPMSK : DOEPMSK; 1748 1719 1749 1720 if (!list_empty(&hs_ep->queue)) { 1750 1721 hs_req = get_ep_head(hs_ep); ··· 1758 1733 } else { 1759 1734 dev_dbg(hsotg->dev, "%s: No more ISOC-OUT requests\n", 1760 1735 __func__); 1761 - mask = dwc2_readl(hsotg, epmsk_reg); 1762 - mask |= DOEPMSK_OUTTKNEPDISMSK; 1763 - dwc2_writel(hsotg, mask, epmsk_reg); 1764 1736 } 1765 1737 } 1766 1738 ··· 2328 2306 dwc2_hsotg_program_zlp(hsotg, hsotg->eps_out[0]); 2329 2307 } 2330 2308 2331 - static void dwc2_hsotg_change_ep_iso_parity(struct dwc2_hsotg *hsotg, 2332 - u32 epctl_reg) 2333 - { 2334 - u32 ctrl; 2335 - 2336 - ctrl = dwc2_readl(hsotg, epctl_reg); 2337 - if (ctrl & DXEPCTL_EOFRNUM) 2338 - ctrl |= DXEPCTL_SETEVENFR; 2339 - else 2340 - ctrl |= DXEPCTL_SETODDFR; 2341 - dwc2_writel(hsotg, ctrl, epctl_reg); 2342 - } 2343 - 2344 2309 /* 2345 2310 * dwc2_gadget_get_xfersize_ddma - get transferred bytes amount from desc 2346 2311 * @hs_ep - The endpoint on which transfer went ··· 2448 2439 dwc2_hsotg_ep0_zlp(hsotg, true); 2449 2440 } 2450 2441 2451 - /* 2452 - * Slave mode OUT transfers do not go through XferComplete so 2453 - * adjust the ISOC parity here. 2454 - */ 2455 - if (!using_dma(hsotg)) { 2456 - if (hs_ep->isochronous && hs_ep->interval == 1) 2457 - dwc2_hsotg_change_ep_iso_parity(hsotg, DOEPCTL(epnum)); 2458 - else if (hs_ep->isochronous && hs_ep->interval > 1) 2459 - dwc2_gadget_incr_frame_num(hs_ep); 2460 - } 2461 - 2462 2442 /* Set actual frame number for completed transfers */ 2463 - if (!using_desc_dma(hsotg) && hs_ep->isochronous) 2464 - req->frame_number = hsotg->frame_number; 2443 + if (!using_desc_dma(hsotg) && hs_ep->isochronous) { 2444 + req->frame_number = hs_ep->target_frame; 2445 + dwc2_gadget_incr_frame_num(hs_ep); 2446 + } 2465 2447 2466 2448 dwc2_hsotg_complete_request(hsotg, hs_ep, hs_req, result); 2467 2449 } ··· 2766 2766 return; 2767 2767 } 2768 2768 2769 + /* Set actual frame number for completed transfers */ 2770 + if (!using_desc_dma(hsotg) && hs_ep->isochronous) { 2771 + hs_req->req.frame_number = hs_ep->target_frame; 2772 + dwc2_gadget_incr_frame_num(hs_ep); 2773 + } 2774 + 2769 2775 dwc2_hsotg_complete_request(hsotg, hs_ep, hs_req, 0); 2770 2776 } 2771 2777 ··· 2832 2826 2833 2827 dwc2_hsotg_txfifo_flush(hsotg, hs_ep->fifo_index); 2834 2828 2835 - if (hs_ep->isochronous) { 2836 - dwc2_hsotg_complete_in(hsotg, hs_ep); 2837 - return; 2838 - } 2839 - 2840 2829 if ((epctl & DXEPCTL_STALL) && (epctl & DXEPCTL_EPTYPE_BULK)) { 2841 2830 int dctl = dwc2_readl(hsotg, DCTL); 2842 2831 2843 2832 dctl |= DCTL_CGNPINNAK; 2844 2833 dwc2_writel(hsotg, dctl, DCTL); 2845 2834 } 2846 - return; 2847 - } 2835 + } else { 2848 2836 2849 - if (dctl & DCTL_GOUTNAKSTS) { 2850 - dctl |= DCTL_CGOUTNAK; 2851 - dwc2_writel(hsotg, dctl, DCTL); 2837 + if (dctl & DCTL_GOUTNAKSTS) { 2838 + dctl |= DCTL_CGOUTNAK; 2839 + dwc2_writel(hsotg, dctl, DCTL); 2840 + } 2852 2841 } 2853 2842 2854 2843 if (!hs_ep->isochronous) ··· 2864 2863 /* Update current frame number value. */ 2865 2864 hsotg->frame_number = dwc2_hsotg_read_frameno(hsotg); 2866 2865 } while (dwc2_gadget_target_frame_elapsed(hs_ep)); 2867 - 2868 - dwc2_gadget_start_next_request(hs_ep); 2869 2866 } 2870 2867 2871 2868 /** ··· 2880 2881 static void dwc2_gadget_handle_out_token_ep_disabled(struct dwc2_hsotg_ep *ep) 2881 2882 { 2882 2883 struct dwc2_hsotg *hsotg = ep->parent; 2884 + struct dwc2_hsotg_req *hs_req; 2883 2885 int dir_in = ep->dir_in; 2884 - u32 doepmsk; 2885 2886 2886 2887 if (dir_in || !ep->isochronous) 2887 2888 return; ··· 2895 2896 return; 2896 2897 } 2897 2898 2898 - if (ep->interval > 1 && 2899 - ep->target_frame == TARGET_FRAME_INITIAL) { 2899 + if (ep->target_frame == TARGET_FRAME_INITIAL) { 2900 2900 u32 ctrl; 2901 2901 2902 2902 ep->target_frame = hsotg->frame_number; 2903 - dwc2_gadget_incr_frame_num(ep); 2903 + if (ep->interval > 1) { 2904 + ctrl = dwc2_readl(hsotg, DOEPCTL(ep->index)); 2905 + if (ep->target_frame & 0x1) 2906 + ctrl |= DXEPCTL_SETODDFR; 2907 + else 2908 + ctrl |= DXEPCTL_SETEVENFR; 2904 2909 2905 - ctrl = dwc2_readl(hsotg, DOEPCTL(ep->index)); 2906 - if (ep->target_frame & 0x1) 2907 - ctrl |= DXEPCTL_SETODDFR; 2908 - else 2909 - ctrl |= DXEPCTL_SETEVENFR; 2910 - 2911 - dwc2_writel(hsotg, ctrl, DOEPCTL(ep->index)); 2910 + dwc2_writel(hsotg, ctrl, DOEPCTL(ep->index)); 2911 + } 2912 2912 } 2913 2913 2914 - dwc2_gadget_start_next_request(ep); 2915 - doepmsk = dwc2_readl(hsotg, DOEPMSK); 2916 - doepmsk &= ~DOEPMSK_OUTTKNEPDISMSK; 2917 - dwc2_writel(hsotg, doepmsk, DOEPMSK); 2914 + while (dwc2_gadget_target_frame_elapsed(ep)) { 2915 + hs_req = get_ep_head(ep); 2916 + if (hs_req) 2917 + dwc2_hsotg_complete_request(hsotg, ep, hs_req, -ENODATA); 2918 + 2919 + dwc2_gadget_incr_frame_num(ep); 2920 + /* Update current frame number value. */ 2921 + hsotg->frame_number = dwc2_hsotg_read_frameno(hsotg); 2922 + } 2923 + 2924 + if (!ep->req) 2925 + dwc2_gadget_start_next_request(ep); 2926 + 2918 2927 } 2928 + 2929 + static void dwc2_hsotg_ep_stop_xfr(struct dwc2_hsotg *hsotg, 2930 + struct dwc2_hsotg_ep *hs_ep); 2919 2931 2920 2932 /** 2921 2933 * dwc2_gadget_handle_nak - handle NAK interrupt ··· 2945 2935 static void dwc2_gadget_handle_nak(struct dwc2_hsotg_ep *hs_ep) 2946 2936 { 2947 2937 struct dwc2_hsotg *hsotg = hs_ep->parent; 2938 + struct dwc2_hsotg_req *hs_req; 2948 2939 int dir_in = hs_ep->dir_in; 2940 + u32 ctrl; 2949 2941 2950 2942 if (!dir_in || !hs_ep->isochronous) 2951 2943 return; ··· 2989 2977 2990 2978 dwc2_writel(hsotg, ctrl, DIEPCTL(hs_ep->index)); 2991 2979 } 2992 - 2993 - dwc2_hsotg_complete_request(hsotg, hs_ep, 2994 - get_ep_head(hs_ep), 0); 2995 2980 } 2996 2981 2997 - if (!using_desc_dma(hsotg)) 2982 + if (using_desc_dma(hsotg)) 2983 + return; 2984 + 2985 + ctrl = dwc2_readl(hsotg, DIEPCTL(hs_ep->index)); 2986 + if (ctrl & DXEPCTL_EPENA) 2987 + dwc2_hsotg_ep_stop_xfr(hsotg, hs_ep); 2988 + else 2989 + dwc2_hsotg_txfifo_flush(hsotg, hs_ep->fifo_index); 2990 + 2991 + while (dwc2_gadget_target_frame_elapsed(hs_ep)) { 2992 + hs_req = get_ep_head(hs_ep); 2993 + if (hs_req) 2994 + dwc2_hsotg_complete_request(hsotg, hs_ep, hs_req, -ENODATA); 2995 + 2998 2996 dwc2_gadget_incr_frame_num(hs_ep); 2997 + /* Update current frame number value. */ 2998 + hsotg->frame_number = dwc2_hsotg_read_frameno(hsotg); 2999 + } 3000 + 3001 + if (!hs_ep->req) 3002 + dwc2_gadget_start_next_request(hs_ep); 2999 3003 } 3000 3004 3001 3005 /** ··· 3067 3039 3068 3040 /* In DDMA handle isochronous requests separately */ 3069 3041 if (using_desc_dma(hsotg) && hs_ep->isochronous) { 3070 - /* XferCompl set along with BNA */ 3071 - if (!(ints & DXEPINT_BNAINTR)) 3072 - dwc2_gadget_complete_isoc_request_ddma(hs_ep); 3042 + dwc2_gadget_complete_isoc_request_ddma(hs_ep); 3073 3043 } else if (dir_in) { 3074 3044 /* 3075 3045 * We get OutDone from the FIFO, so we only 3076 3046 * need to look at completing IN requests here 3077 3047 * if operating slave mode 3078 3048 */ 3079 - if (hs_ep->isochronous && hs_ep->interval > 1) 3080 - dwc2_gadget_incr_frame_num(hs_ep); 3081 - 3082 - dwc2_hsotg_complete_in(hsotg, hs_ep); 3083 - if (ints & DXEPINT_NAKINTRPT) 3084 - ints &= ~DXEPINT_NAKINTRPT; 3049 + if (!hs_ep->isochronous || !(ints & DXEPINT_NAKINTRPT)) 3050 + dwc2_hsotg_complete_in(hsotg, hs_ep); 3085 3051 3086 3052 if (idx == 0 && !hs_ep->req) 3087 3053 dwc2_hsotg_enqueue_setup(hsotg); ··· 3084 3062 * We're using DMA, we need to fire an OutDone here 3085 3063 * as we ignore the RXFIFO. 3086 3064 */ 3087 - if (hs_ep->isochronous && hs_ep->interval > 1) 3088 - dwc2_gadget_incr_frame_num(hs_ep); 3089 - 3090 - dwc2_hsotg_handle_outdone(hsotg, idx); 3065 + if (!hs_ep->isochronous || !(ints & DXEPINT_OUTTKNEPDIS)) 3066 + dwc2_hsotg_handle_outdone(hsotg, idx); 3091 3067 } 3092 3068 } 3093 3069 ··· 4105 4085 mask |= DIEPMSK_NAKMSK; 4106 4086 dwc2_writel(hsotg, mask, DIEPMSK); 4107 4087 } else { 4088 + epctrl |= DXEPCTL_SNAK; 4108 4089 mask = dwc2_readl(hsotg, DOEPMSK); 4109 4090 mask |= DOEPMSK_OUTTKNEPDISMSK; 4110 4091 dwc2_writel(hsotg, mask, DOEPMSK);
+4
drivers/usb/dwc2/hcd.c
··· 5191 5191 hcd->has_tt = 1; 5192 5192 5193 5193 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 5194 + if (!res) { 5195 + retval = -EINVAL; 5196 + goto error1; 5197 + } 5194 5198 hcd->rsrc_start = res->start; 5195 5199 hcd->rsrc_len = resource_size(res); 5196 5200
+13 -17
drivers/usb/dwc3/core.c
··· 264 264 { 265 265 u32 reg; 266 266 int retries = 1000; 267 - int ret; 268 - 269 - usb_phy_init(dwc->usb2_phy); 270 - usb_phy_init(dwc->usb3_phy); 271 - ret = phy_init(dwc->usb2_generic_phy); 272 - if (ret < 0) 273 - return ret; 274 - 275 - ret = phy_init(dwc->usb3_generic_phy); 276 - if (ret < 0) { 277 - phy_exit(dwc->usb2_generic_phy); 278 - return ret; 279 - } 280 267 281 268 /* 282 269 * We're resetting only the device side because, if we're in host mode, ··· 296 309 else 297 310 udelay(1); 298 311 } while (--retries); 299 - 300 - phy_exit(dwc->usb3_generic_phy); 301 - phy_exit(dwc->usb2_generic_phy); 302 312 303 313 return -ETIMEDOUT; 304 314 ··· 966 982 dwc->phys_ready = true; 967 983 } 968 984 985 + usb_phy_init(dwc->usb2_phy); 986 + usb_phy_init(dwc->usb3_phy); 987 + ret = phy_init(dwc->usb2_generic_phy); 988 + if (ret < 0) 989 + goto err0a; 990 + 991 + ret = phy_init(dwc->usb3_generic_phy); 992 + if (ret < 0) { 993 + phy_exit(dwc->usb2_generic_phy); 994 + goto err0a; 995 + } 996 + 969 997 ret = dwc3_core_soft_reset(dwc); 970 998 if (ret) 971 - goto err0a; 999 + goto err1; 972 1000 973 1001 if (hw_mode == DWC3_GHWPARAMS0_MODE_DRD && 974 1002 !DWC3_VER_IS_WITHIN(DWC3, ANY, 194A)) {
+18 -1
drivers/usb/gadget/function/f_uac2.c
··· 406 406 .bInterval = 4, 407 407 }; 408 408 409 + static struct usb_ss_ep_comp_descriptor ss_epin_fback_desc_comp = { 410 + .bLength = sizeof(ss_epin_fback_desc_comp), 411 + .bDescriptorType = USB_DT_SS_ENDPOINT_COMP, 412 + .bMaxBurst = 0, 413 + .bmAttributes = 0, 414 + .wBytesPerInterval = cpu_to_le16(4), 415 + }; 416 + 409 417 410 418 /* Audio Streaming IN Interface - Alt0 */ 411 419 static struct usb_interface_descriptor std_as_in_if0_desc = { ··· 605 597 (struct usb_descriptor_header *)&ss_epout_desc_comp, 606 598 (struct usb_descriptor_header *)&as_iso_out_desc, 607 599 (struct usb_descriptor_header *)&ss_epin_fback_desc, 600 + (struct usb_descriptor_header *)&ss_epin_fback_desc_comp, 608 601 609 602 (struct usb_descriptor_header *)&std_as_in_if0_desc, 610 603 (struct usb_descriptor_header *)&std_as_in_if1_desc, ··· 714 705 { 715 706 struct usb_ss_ep_comp_descriptor *epout_desc_comp = NULL; 716 707 struct usb_ss_ep_comp_descriptor *epin_desc_comp = NULL; 708 + struct usb_ss_ep_comp_descriptor *epin_fback_desc_comp = NULL; 717 709 struct usb_endpoint_descriptor *epout_desc; 718 710 struct usb_endpoint_descriptor *epin_desc; 719 711 struct usb_endpoint_descriptor *epin_fback_desc; ··· 740 730 epout_desc_comp = &ss_epout_desc_comp; 741 731 epin_desc_comp = &ss_epin_desc_comp; 742 732 epin_fback_desc = &ss_epin_fback_desc; 733 + epin_fback_desc_comp = &ss_epin_fback_desc_comp; 743 734 ep_int_desc = &ss_ep_int_desc; 744 735 } 745 736 ··· 784 773 785 774 headers[i++] = USBDHDR(&as_iso_out_desc); 786 775 787 - if (EPOUT_FBACK_IN_EN(opts)) 776 + if (EPOUT_FBACK_IN_EN(opts)) { 788 777 headers[i++] = USBDHDR(epin_fback_desc); 778 + if (epin_fback_desc_comp) 779 + headers[i++] = USBDHDR(epin_fback_desc_comp); 780 + } 789 781 } 790 782 791 783 if (EPIN_EN(opts)) { ··· 1177 1163 le16_to_cpu(ss_epin_desc.wMaxPacketSize)); 1178 1164 agdev->out_ep_maxpsize = max_t(u16, agdev->out_ep_maxpsize, 1179 1165 le16_to_cpu(ss_epout_desc.wMaxPacketSize)); 1166 + 1167 + ss_epin_desc_comp.wBytesPerInterval = ss_epin_desc.wMaxPacketSize; 1168 + ss_epout_desc_comp.wBytesPerInterval = ss_epout_desc.wMaxPacketSize; 1180 1169 1181 1170 // HS and SS endpoint addresses are copied from autoconfigured FS descriptors 1182 1171 hs_ep_int_desc.bEndpointAddress = fs_ep_int_desc.bEndpointAddress;
+10 -3
drivers/usb/gadget/function/u_audio.c
··· 96 96 }; 97 97 98 98 static void u_audio_set_fback_frequency(enum usb_device_speed speed, 99 + struct usb_ep *out_ep, 99 100 unsigned long long freq, 100 101 unsigned int pitch, 101 102 void *buf) 102 103 { 103 104 u32 ff = 0; 105 + const struct usb_endpoint_descriptor *ep_desc; 104 106 105 107 /* 106 108 * Because the pitch base is 1000000, the final divider here ··· 130 128 * byte fromat (that is Q16.16) 131 129 * 132 130 * ff = (freq << 16) / 8000 131 + * 132 + * Win10 and OSX UAC2 drivers require number of samples per packet 133 + * in order to honor the feedback value. 134 + * Linux snd-usb-audio detects the applied bit-shift automatically. 133 135 */ 134 - freq <<= 4; 136 + ep_desc = out_ep->desc; 137 + freq <<= 4 + (ep_desc->bInterval - 1); 135 138 } 136 139 137 140 ff = DIV_ROUND_CLOSEST_ULL((freq * pitch), 1953125); ··· 274 267 pr_debug("%s: iso_complete status(%d) %d/%d\n", 275 268 __func__, status, req->actual, req->length); 276 269 277 - u_audio_set_fback_frequency(audio_dev->gadget->speed, 270 + u_audio_set_fback_frequency(audio_dev->gadget->speed, audio_dev->out_ep, 278 271 params->c_srate, prm->pitch, 279 272 req->buf); 280 273 ··· 533 526 * be meauserd at start of playback 534 527 */ 535 528 prm->pitch = 1000000; 536 - u_audio_set_fback_frequency(audio_dev->gadget->speed, 529 + u_audio_set_fback_frequency(audio_dev->gadget->speed, ep, 537 530 params->c_srate, prm->pitch, 538 531 req_fback->buf); 539 532
+1 -1
drivers/usb/gadget/udc/r8a66597-udc.c
··· 1250 1250 do { 1251 1251 tmp = r8a66597_read(r8a66597, INTSTS0) & CTSQ; 1252 1252 udelay(1); 1253 - } while (tmp != CS_IDST || timeout-- > 0); 1253 + } while (tmp != CS_IDST && timeout-- > 0); 1254 1254 1255 1255 if (tmp == CS_IDST) 1256 1256 r8a66597_bset(r8a66597,
+1 -4
drivers/usb/host/bcma-hcd.c
··· 406 406 return -ENOMEM; 407 407 usb_dev->core = core; 408 408 409 - if (core->dev.of_node) { 409 + if (core->dev.of_node) 410 410 usb_dev->gpio_desc = devm_gpiod_get(&core->dev, "vcc", 411 411 GPIOD_OUT_HIGH); 412 - if (IS_ERR(usb_dev->gpio_desc)) 413 - return PTR_ERR(usb_dev->gpio_desc); 414 - } 415 412 416 413 switch (core->id.id) { 417 414 case BCMA_CORE_USB20_HOST:
+27 -48
drivers/usb/host/ehci-hcd.c
··· 26 26 #include <linux/moduleparam.h> 27 27 #include <linux/dma-mapping.h> 28 28 #include <linux/debugfs.h> 29 + #include <linux/platform_device.h> 29 30 #include <linux/slab.h> 30 31 31 32 #include <asm/byteorder.h> ··· 1279 1278 1280 1279 #ifdef CONFIG_USB_EHCI_SH 1281 1280 #include "ehci-sh.c" 1282 - #define PLATFORM_DRIVER ehci_hcd_sh_driver 1283 1281 #endif 1284 1282 1285 1283 #ifdef CONFIG_PPC_PS3 1286 1284 #include "ehci-ps3.c" 1287 - #define PS3_SYSTEM_BUS_DRIVER ps3_ehci_driver 1288 1285 #endif 1289 1286 1290 1287 #ifdef CONFIG_USB_EHCI_HCD_PPC_OF 1291 1288 #include "ehci-ppc-of.c" 1292 - #define OF_PLATFORM_DRIVER ehci_hcd_ppc_of_driver 1293 1289 #endif 1294 1290 1295 1291 #ifdef CONFIG_XPS_USB_HCD_XILINX 1296 1292 #include "ehci-xilinx-of.c" 1297 - #define XILINX_OF_PLATFORM_DRIVER ehci_hcd_xilinx_of_driver 1298 1293 #endif 1299 1294 1300 1295 #ifdef CONFIG_SPARC_LEON 1301 1296 #include "ehci-grlib.c" 1302 - #define PLATFORM_DRIVER ehci_grlib_driver 1303 1297 #endif 1298 + 1299 + static struct platform_driver * const platform_drivers[] = { 1300 + #ifdef CONFIG_USB_EHCI_SH 1301 + &ehci_hcd_sh_driver, 1302 + #endif 1303 + #ifdef CONFIG_USB_EHCI_HCD_PPC_OF 1304 + &ehci_hcd_ppc_of_driver, 1305 + #endif 1306 + #ifdef CONFIG_XPS_USB_HCD_XILINX 1307 + &ehci_hcd_xilinx_of_driver, 1308 + #endif 1309 + #ifdef CONFIG_SPARC_LEON 1310 + &ehci_grlib_driver, 1311 + #endif 1312 + }; 1304 1313 1305 1314 static int __init ehci_hcd_init(void) 1306 1315 { ··· 1335 1324 ehci_debug_root = debugfs_create_dir("ehci", usb_debug_root); 1336 1325 #endif 1337 1326 1338 - #ifdef PLATFORM_DRIVER 1339 - retval = platform_driver_register(&PLATFORM_DRIVER); 1327 + retval = platform_register_drivers(platform_drivers, ARRAY_SIZE(platform_drivers)); 1340 1328 if (retval < 0) 1341 1329 goto clean0; 1342 - #endif 1343 1330 1344 - #ifdef PS3_SYSTEM_BUS_DRIVER 1345 - retval = ps3_ehci_driver_register(&PS3_SYSTEM_BUS_DRIVER); 1331 + #ifdef CONFIG_PPC_PS3 1332 + retval = ps3_ehci_driver_register(&ps3_ehci_driver); 1346 1333 if (retval < 0) 1347 - goto clean2; 1334 + goto clean1; 1348 1335 #endif 1349 1336 1350 - #ifdef OF_PLATFORM_DRIVER 1351 - retval = platform_driver_register(&OF_PLATFORM_DRIVER); 1352 - if (retval < 0) 1353 - goto clean3; 1354 - #endif 1337 + return 0; 1355 1338 1356 - #ifdef XILINX_OF_PLATFORM_DRIVER 1357 - retval = platform_driver_register(&XILINX_OF_PLATFORM_DRIVER); 1358 - if (retval < 0) 1359 - goto clean4; 1339 + #ifdef CONFIG_PPC_PS3 1340 + clean1: 1360 1341 #endif 1361 - return retval; 1362 - 1363 - #ifdef XILINX_OF_PLATFORM_DRIVER 1364 - /* platform_driver_unregister(&XILINX_OF_PLATFORM_DRIVER); */ 1365 - clean4: 1366 - #endif 1367 - #ifdef OF_PLATFORM_DRIVER 1368 - platform_driver_unregister(&OF_PLATFORM_DRIVER); 1369 - clean3: 1370 - #endif 1371 - #ifdef PS3_SYSTEM_BUS_DRIVER 1372 - ps3_ehci_driver_unregister(&PS3_SYSTEM_BUS_DRIVER); 1373 - clean2: 1374 - #endif 1375 - #ifdef PLATFORM_DRIVER 1376 - platform_driver_unregister(&PLATFORM_DRIVER); 1342 + platform_unregister_drivers(platform_drivers, ARRAY_SIZE(platform_drivers)); 1377 1343 clean0: 1378 - #endif 1379 1344 #ifdef CONFIG_DYNAMIC_DEBUG 1380 1345 debugfs_remove(ehci_debug_root); 1381 1346 ehci_debug_root = NULL; ··· 1363 1376 1364 1377 static void __exit ehci_hcd_cleanup(void) 1365 1378 { 1366 - #ifdef XILINX_OF_PLATFORM_DRIVER 1367 - platform_driver_unregister(&XILINX_OF_PLATFORM_DRIVER); 1379 + #ifdef CONFIG_PPC_PS3 1380 + ps3_ehci_driver_unregister(&ps3_ehci_driver); 1368 1381 #endif 1369 - #ifdef OF_PLATFORM_DRIVER 1370 - platform_driver_unregister(&OF_PLATFORM_DRIVER); 1371 - #endif 1372 - #ifdef PLATFORM_DRIVER 1373 - platform_driver_unregister(&PLATFORM_DRIVER); 1374 - #endif 1375 - #ifdef PS3_SYSTEM_BUS_DRIVER 1376 - ps3_ehci_driver_unregister(&PS3_SYSTEM_BUS_DRIVER); 1377 - #endif 1382 + platform_unregister_drivers(platform_drivers, ARRAY_SIZE(platform_drivers)); 1378 1383 #ifdef CONFIG_DYNAMIC_DEBUG 1379 1384 debugfs_remove(ehci_debug_root); 1380 1385 #endif
+1
drivers/usb/host/xhci.c
··· 692 692 if (ret) 693 693 xhci_free_command(xhci, command); 694 694 } 695 + set_bit(HCD_FLAG_DEFER_RH_REGISTER, &hcd->flags); 695 696 xhci_dbg_trace(xhci, trace_xhci_dbg_init, 696 697 "Finished xhci_run for USB2 roothub"); 697 698
+1
drivers/usb/musb/tusb6010.c
··· 190 190 } 191 191 if (len > 0) { 192 192 /* Write the rest 1 - 3 bytes to FIFO */ 193 + val = 0; 193 194 memcpy(&val, buf, len); 194 195 musb_writel(fifo, 0, val); 195 196 }
+38
drivers/usb/serial/cp210x.c
··· 233 233 { USB_DEVICE(0x1FB9, 0x0602) }, /* Lake Shore Model 648 Magnet Power Supply */ 234 234 { USB_DEVICE(0x1FB9, 0x0700) }, /* Lake Shore Model 737 VSM Controller */ 235 235 { USB_DEVICE(0x1FB9, 0x0701) }, /* Lake Shore Model 776 Hall Matrix */ 236 + { USB_DEVICE(0x2184, 0x0030) }, /* GW Instek GDM-834x Digital Multimeter */ 236 237 { USB_DEVICE(0x2626, 0xEA60) }, /* Aruba Networks 7xxx USB Serial Console */ 237 238 { USB_DEVICE(0x3195, 0xF190) }, /* Link Instruments MSO-19 */ 238 239 { USB_DEVICE(0x3195, 0xF280) }, /* Link Instruments MSO-28 */ ··· 259 258 speed_t max_speed; 260 259 bool use_actual_rate; 261 260 bool no_flow_control; 261 + bool no_event_mode; 262 262 }; 263 263 264 264 enum cp210x_event_state { ··· 1115 1113 1116 1114 static void cp210x_enable_event_mode(struct usb_serial_port *port) 1117 1115 { 1116 + struct cp210x_serial_private *priv = usb_get_serial_data(port->serial); 1118 1117 struct cp210x_port_private *port_priv = usb_get_serial_port_data(port); 1119 1118 int ret; 1120 1119 1121 1120 if (port_priv->event_mode) 1121 + return; 1122 + 1123 + if (priv->no_event_mode) 1122 1124 return; 1123 1125 1124 1126 port_priv->event_state = ES_DATA; ··· 2080 2074 priv->use_actual_rate = use_actual_rate; 2081 2075 } 2082 2076 2077 + static void cp2102_determine_quirks(struct usb_serial *serial) 2078 + { 2079 + struct cp210x_serial_private *priv = usb_get_serial_data(serial); 2080 + u8 *buf; 2081 + int ret; 2082 + 2083 + buf = kmalloc(2, GFP_KERNEL); 2084 + if (!buf) 2085 + return; 2086 + /* 2087 + * Some (possibly counterfeit) CP2102 do not support event-insertion 2088 + * mode and respond differently to malformed vendor requests. 2089 + * Specifically, they return one instead of two bytes when sent a 2090 + * two-byte part-number request. 2091 + */ 2092 + ret = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0), 2093 + CP210X_VENDOR_SPECIFIC, REQTYPE_DEVICE_TO_HOST, 2094 + CP210X_GET_PARTNUM, 0, buf, 2, USB_CTRL_GET_TIMEOUT); 2095 + if (ret == 1) { 2096 + dev_dbg(&serial->interface->dev, 2097 + "device does not support event-insertion mode\n"); 2098 + priv->no_event_mode = true; 2099 + } 2100 + 2101 + kfree(buf); 2102 + } 2103 + 2083 2104 static int cp210x_get_fw_version(struct usb_serial *serial, u16 value) 2084 2105 { 2085 2106 struct cp210x_serial_private *priv = usb_get_serial_data(serial); ··· 2141 2108 return; 2142 2109 } 2143 2110 2111 + dev_dbg(&serial->interface->dev, "partnum = 0x%02x\n", priv->partnum); 2112 + 2144 2113 switch (priv->partnum) { 2114 + case CP210X_PARTNUM_CP2102: 2115 + cp2102_determine_quirks(serial); 2116 + break; 2145 2117 case CP210X_PARTNUM_CP2105: 2146 2118 case CP210X_PARTNUM_CP2108: 2147 2119 cp210x_get_fw_version(serial, CP210X_GET_FW_VER);
-2
drivers/usb/serial/mos7840.c
··· 107 107 #define BANDB_DEVICE_ID_USOPTL4_2P 0xBC02 108 108 #define BANDB_DEVICE_ID_USOPTL4_4 0xAC44 109 109 #define BANDB_DEVICE_ID_USOPTL4_4P 0xBC03 110 - #define BANDB_DEVICE_ID_USOPTL2_4 0xAC24 111 110 112 111 /* Interrupt Routine Defines */ 113 112 ··· 185 186 { USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_2P) }, 186 187 { USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_4) }, 187 188 { USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_4P) }, 188 - { USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL2_4) }, 189 189 {} /* terminating entry */ 190 190 }; 191 191 MODULE_DEVICE_TABLE(usb, id_table);
+10 -1
drivers/usb/serial/option.c
··· 1205 1205 .driver_info = NCTRL(0) | RSVD(1) }, 1206 1206 { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1056, 0xff), /* Telit FD980 */ 1207 1207 .driver_info = NCTRL(2) | RSVD(3) }, 1208 + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1060, 0xff), /* Telit LN920 (rmnet) */ 1209 + .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) }, 1210 + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1061, 0xff), /* Telit LN920 (MBIM) */ 1211 + .driver_info = NCTRL(0) | RSVD(1) }, 1212 + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1062, 0xff), /* Telit LN920 (RNDIS) */ 1213 + .driver_info = NCTRL(2) | RSVD(3) }, 1214 + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1063, 0xff), /* Telit LN920 (ECM) */ 1215 + .driver_info = NCTRL(0) | RSVD(1) }, 1208 1216 { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910), 1209 1217 .driver_info = NCTRL(0) | RSVD(1) | RSVD(3) }, 1210 1218 { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910_DUAL_MODEM), ··· 1658 1650 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0060, 0xff, 0xff, 0xff) }, 1659 1651 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0070, 0xff, 0xff, 0xff) }, 1660 1652 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0073, 0xff, 0xff, 0xff) }, 1661 - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0094, 0xff, 0xff, 0xff) }, 1662 1653 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0130, 0xff, 0xff, 0xff), 1663 1654 .driver_info = RSVD(1) }, 1664 1655 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0133, 0xff, 0xff, 0xff), ··· 2075 2068 .driver_info = RSVD(0) | RSVD(1) | RSVD(6) }, 2076 2069 { USB_DEVICE(0x0489, 0xe0b5), /* Foxconn T77W968 ESIM */ 2077 2070 .driver_info = RSVD(0) | RSVD(1) | RSVD(6) }, 2071 + { USB_DEVICE_INTERFACE_CLASS(0x0489, 0xe0db, 0xff), /* Foxconn T99W265 MBIM */ 2072 + .driver_info = RSVD(3) }, 2078 2073 { USB_DEVICE(0x1508, 0x1001), /* Fibocom NL668 (IOT version) */ 2079 2074 .driver_info = RSVD(4) | RSVD(5) | RSVD(6) }, 2080 2075 { USB_DEVICE(0x2cb7, 0x0104), /* Fibocom NL678 series */
+8 -1
drivers/usb/storage/unusual_devs.h
··· 416 416 USB_SC_UFI, USB_PR_DEVICE, NULL, US_FL_FIX_INQUIRY | US_FL_SINGLE_LUN), 417 417 418 418 /* 419 - * Reported by Ondrej Zary <linux@rainbow-software.org> 419 + * Reported by Ondrej Zary <linux@zary.sk> 420 420 * The device reports one sector more and breaks when that sector is accessed 421 + * Firmwares older than 2.6c (the latest one and the only that claims Linux 422 + * support) have also broken tag handling 421 423 */ 424 + UNUSUAL_DEV( 0x04ce, 0x0002, 0x0000, 0x026b, 425 + "ScanLogic", 426 + "SL11R-IDE", 427 + USB_SC_DEVICE, USB_PR_DEVICE, NULL, 428 + US_FL_FIX_CAPACITY | US_FL_BULK_IGNORE_TAG), 422 429 UNUSUAL_DEV( 0x04ce, 0x0002, 0x026c, 0x026c, 423 430 "ScanLogic", 424 431 "SL11R-IDE",
+1 -1
drivers/usb/storage/unusual_uas.h
··· 50 50 "LaCie", 51 51 "Rugged USB3-FW", 52 52 USB_SC_DEVICE, USB_PR_DEVICE, NULL, 53 - US_FL_IGNORE_UAS), 53 + US_FL_NO_REPORT_OPCODES | US_FL_NO_SAME), 54 54 55 55 /* 56 56 * Apricorn USB3 dongle sometimes returns "USBSUSBSUSBS" in response to SCSI
+2
include/linux/usb/hcd.h
··· 124 124 #define HCD_FLAG_RH_RUNNING 5 /* root hub is running? */ 125 125 #define HCD_FLAG_DEAD 6 /* controller has died? */ 126 126 #define HCD_FLAG_INTF_AUTHORIZED 7 /* authorize interfaces? */ 127 + #define HCD_FLAG_DEFER_RH_REGISTER 8 /* Defer roothub registration */ 127 128 128 129 /* The flags can be tested using these macros; they are likely to 129 130 * be slightly faster than test_bit(). ··· 135 134 #define HCD_WAKEUP_PENDING(hcd) ((hcd)->flags & (1U << HCD_FLAG_WAKEUP_PENDING)) 136 135 #define HCD_RH_RUNNING(hcd) ((hcd)->flags & (1U << HCD_FLAG_RH_RUNNING)) 137 136 #define HCD_DEAD(hcd) ((hcd)->flags & (1U << HCD_FLAG_DEAD)) 137 + #define HCD_DEFER_RH_REGISTER(hcd) ((hcd)->flags & (1U << HCD_FLAG_DEFER_RH_REGISTER)) 138 138 139 139 /* 140 140 * Specifies if interfaces are authorized by default
+8 -6
tools/usb/testusb.c
··· 265 265 } 266 266 267 267 entry->ifnum = ifnum; 268 - 269 - /* FIXME update USBDEVFS_CONNECTINFO so it tells about high speed etc */ 270 - 271 - fprintf(stderr, "%s speed\t%s\t%u\n", 272 - speed(entry->speed), entry->name, entry->ifnum); 273 - 274 268 entry->next = testdevs; 275 269 testdevs = entry; 276 270 return 0; ··· 292 298 perror ("can't open dev file r/w"); 293 299 return 0; 294 300 } 301 + 302 + status = ioctl(fd, USBDEVFS_GET_SPEED, NULL); 303 + if (status < 0) 304 + fprintf(stderr, "USBDEVFS_GET_SPEED failed %d\n", status); 305 + else 306 + dev->speed = status; 307 + fprintf(stderr, "%s speed\t%s\t%u\n", 308 + speed(dev->speed), dev->name, dev->ifnum); 295 309 296 310 restart: 297 311 for (i = 0; i < TEST_CASES; i++) {