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

Pull USB/PHY driver fixes from Greg KH:
"Here are some small USB and PHY driver fixes for 4.20-rc5

Nothing big at all, just the usual handful of USB fixes for reported
issues, along with some gadget and PHY driver bug fixes.

All of these have been in linux-next with no reported issues. Note,
the USB gadget fixes were in linux-next on its own branch, not in
mine, it just got merged into here yesterday and missed linux-next of
today"

* tag 'usb-4.20-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
usb: gadget: u_ether: fix unsafe list iteration
USB: omap_udc: fix rejection of out transfers when DMA is used
USB: omap_udc: fix USB gadget functionality on Palm Tungsten E
USB: omap_udc: fix omap_udc_start() on 15xx machines
USB: omap_udc: fix crashes on probe error and module removal
USB: omap_udc: use devm_request_irq()
usb: core: quirks: add RESET_RESUME quirk for Cherry G230 Stream series
USB: usb-storage: Add new IDs to ums-realtek
Revert "usb: dwc3: gadget: skip Set/Clear Halt when invalid"
phy: qcom-qusb2: Fix HSTX_TRIM tuning with fused value for SDM845
phy: qcom-qusb2: Use HSTX_TRIM fused value as is
dt-bindings: phy-qcom-qmp: Fix several mistakes from prior commits
phy: uniphier-pcie: Depend on HAS_IOMEM

+87 -86
+24 -9
Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt
··· 40 40 "ref" for 19.2 MHz ref clk, 41 41 "com_aux" for phy common block aux clock, 42 42 "ref_aux" for phy reference aux clock, 43 + 44 + For "qcom,ipq8074-qmp-pcie-phy": no clocks are listed. 43 45 For "qcom,msm8996-qmp-pcie-phy" must contain: 44 46 "aux", "cfg_ahb", "ref". 45 47 For "qcom,msm8996-qmp-usb3-phy" must contain: 46 48 "aux", "cfg_ahb", "ref". 47 - For "qcom,qmp-v3-usb3-phy" must contain: 49 + For "qcom,sdm845-qmp-usb3-phy" must contain: 48 50 "aux", "cfg_ahb", "ref", "com_aux". 51 + For "qcom,sdm845-qmp-usb3-uni-phy" must contain: 52 + "aux", "cfg_ahb", "ref", "com_aux". 53 + For "qcom,sdm845-qmp-ufs-phy" must contain: 54 + "ref", "ref_aux". 49 55 50 56 - resets: a list of phandles and reset controller specifier pairs, 51 57 one for each entry in reset-names. 52 58 - reset-names: "phy" for reset of phy block, 53 59 "common" for phy common block reset, 54 - "cfg" for phy's ahb cfg block reset (Optional). 55 - For "qcom,msm8996-qmp-pcie-phy" must contain: 56 - "phy", "common", "cfg". 57 - For "qcom,msm8996-qmp-usb3-phy" must contain 58 - "phy", "common". 60 + "cfg" for phy's ahb cfg block reset. 61 + 59 62 For "qcom,ipq8074-qmp-pcie-phy" must contain: 60 - "phy", "common". 63 + "phy", "common". 64 + For "qcom,msm8996-qmp-pcie-phy" must contain: 65 + "phy", "common", "cfg". 66 + For "qcom,msm8996-qmp-usb3-phy" must contain 67 + "phy", "common". 68 + For "qcom,sdm845-qmp-usb3-phy" must contain: 69 + "phy", "common". 70 + For "qcom,sdm845-qmp-usb3-uni-phy" must contain: 71 + "phy", "common". 72 + For "qcom,sdm845-qmp-ufs-phy": no resets are listed. 61 73 62 74 - vdda-phy-supply: Phandle to a regulator supply to PHY core block. 63 75 - vdda-pll-supply: Phandle to 1.8V regulator supply to PHY refclk pll block. ··· 91 79 92 80 - #phy-cells: must be 0 93 81 82 + Required properties child node of pcie and usb3 qmp phys: 94 83 - clocks: a list of phandles and clock-specifier pairs, 95 84 one for each entry in clock-names. 96 - - clock-names: Must contain following for pcie and usb qmp phys: 85 + - clock-names: Must contain following: 97 86 "pipe<lane-number>" for pipe clock specific to each lane. 98 87 - clock-output-names: Name of the PHY clock that will be the parent for 99 88 the above pipe clock. ··· 104 91 (or) 105 92 "pcie20_phy1_pipe_clk" 106 93 94 + Required properties for child node of PHYs with lane reset, AKA: 95 + "qcom,msm8996-qmp-pcie-phy" 107 96 - resets: a list of phandles and reset controller specifier pairs, 108 97 one for each entry in reset-names. 109 - - reset-names: Must contain following for pcie qmp phys: 98 + - reset-names: Must contain following: 110 99 "lane<lane-number>" for reset specific to each lane. 111 100 112 101 Example:
+11 -9
drivers/phy/qualcomm/phy-qcom-qusb2.c
··· 231 231 .mask_core_ready = CORE_READY_STATUS, 232 232 .has_pll_override = true, 233 233 .autoresume_en = BIT(0), 234 + .update_tune1_with_efuse = true, 234 235 }; 235 236 236 237 static const char * const qusb2_phy_vreg_names[] = { ··· 403 402 404 403 /* 405 404 * Read efuse register having TUNE2/1 parameter's high nibble. 406 - * If efuse register shows value as 0x0, or if we fail to find 407 - * a valid efuse register settings, then use default value 408 - * as 0xB for high nibble that we have already set while 409 - * configuring phy. 405 + * If efuse register shows value as 0x0 (indicating value is not 406 + * fused), or if we fail to find a valid efuse register setting, 407 + * then use default value for high nibble that we have already 408 + * set while configuring the phy. 410 409 */ 411 410 val = nvmem_cell_read(qphy->cell, NULL); 412 411 if (IS_ERR(val) || !val[0]) { ··· 416 415 417 416 /* Fused TUNE1/2 value is the higher nibble only */ 418 417 if (cfg->update_tune1_with_efuse) 419 - qusb2_setbits(qphy->base, cfg->regs[QUSB2PHY_PORT_TUNE1], 420 - val[0] << 0x4); 418 + qusb2_write_mask(qphy->base, cfg->regs[QUSB2PHY_PORT_TUNE1], 419 + val[0] << HSTX_TRIM_SHIFT, 420 + HSTX_TRIM_MASK); 421 421 else 422 - qusb2_setbits(qphy->base, cfg->regs[QUSB2PHY_PORT_TUNE2], 423 - val[0] << 0x4); 424 - 422 + qusb2_write_mask(qphy->base, cfg->regs[QUSB2PHY_PORT_TUNE2], 423 + val[0] << HSTX_TRIM_SHIFT, 424 + HSTX_TRIM_MASK); 425 425 } 426 426 427 427 static int qusb2_phy_set_mode(struct phy *phy, enum phy_mode mode)
+2 -1
drivers/phy/socionext/Kconfig
··· 26 26 27 27 config PHY_UNIPHIER_PCIE 28 28 tristate "Uniphier PHY driver for PCIe controller" 29 - depends on (ARCH_UNIPHIER || COMPILE_TEST) && OF 29 + depends on ARCH_UNIPHIER || COMPILE_TEST 30 + depends on OF && HAS_IOMEM 30 31 default PCIE_UNIPHIER 31 32 select GENERIC_PHY 32 33 help
+3
drivers/usb/core/quirks.c
··· 209 209 /* Microsoft LifeCam-VX700 v2.0 */ 210 210 { USB_DEVICE(0x045e, 0x0770), .driver_info = USB_QUIRK_RESET_RESUME }, 211 211 212 + /* Cherry Stream G230 2.0 (G85-231) and 3.0 (G85-232) */ 213 + { USB_DEVICE(0x046a, 0x0023), .driver_info = USB_QUIRK_RESET_RESUME }, 214 + 212 215 /* Logitech HD Pro Webcams C920, C920-C, C925e and C930e */ 213 216 { USB_DEVICE(0x046d, 0x082d), .driver_info = USB_QUIRK_DELAY_INIT }, 214 217 { USB_DEVICE(0x046d, 0x0841), .driver_info = USB_QUIRK_DELAY_INIT },
-5
drivers/usb/dwc3/gadget.c
··· 1470 1470 unsigned transfer_in_flight; 1471 1471 unsigned started; 1472 1472 1473 - if (dep->flags & DWC3_EP_STALL) 1474 - return 0; 1475 - 1476 1473 if (dep->number > 1) 1477 1474 trb = dwc3_ep_prev_trb(dep, dep->trb_enqueue); 1478 1475 else ··· 1491 1494 else 1492 1495 dep->flags |= DWC3_EP_STALL; 1493 1496 } else { 1494 - if (!(dep->flags & DWC3_EP_STALL)) 1495 - return 0; 1496 1497 1497 1498 ret = dwc3_send_clear_stall_ep_cmd(dep); 1498 1499 if (ret)
+6 -5
drivers/usb/gadget/function/u_ether.c
··· 401 401 static void rx_fill(struct eth_dev *dev, gfp_t gfp_flags) 402 402 { 403 403 struct usb_request *req; 404 - struct usb_request *tmp; 405 404 unsigned long flags; 406 405 407 406 /* fill unused rxq slots with some skb */ 408 407 spin_lock_irqsave(&dev->req_lock, flags); 409 - list_for_each_entry_safe(req, tmp, &dev->rx_reqs, list) { 408 + while (!list_empty(&dev->rx_reqs)) { 409 + req = list_first_entry(&dev->rx_reqs, struct usb_request, list); 410 410 list_del_init(&req->list); 411 411 spin_unlock_irqrestore(&dev->req_lock, flags); 412 412 ··· 1125 1125 { 1126 1126 struct eth_dev *dev = link->ioport; 1127 1127 struct usb_request *req; 1128 - struct usb_request *tmp; 1129 1128 1130 1129 WARN_ON(!dev); 1131 1130 if (!dev) ··· 1141 1142 */ 1142 1143 usb_ep_disable(link->in_ep); 1143 1144 spin_lock(&dev->req_lock); 1144 - list_for_each_entry_safe(req, tmp, &dev->tx_reqs, list) { 1145 + while (!list_empty(&dev->tx_reqs)) { 1146 + req = list_first_entry(&dev->tx_reqs, struct usb_request, list); 1145 1147 list_del(&req->list); 1146 1148 1147 1149 spin_unlock(&dev->req_lock); ··· 1154 1154 1155 1155 usb_ep_disable(link->out_ep); 1156 1156 spin_lock(&dev->req_lock); 1157 - list_for_each_entry_safe(req, tmp, &dev->rx_reqs, list) { 1157 + while (!list_empty(&dev->rx_reqs)) { 1158 + req = list_first_entry(&dev->rx_reqs, struct usb_request, list); 1158 1159 list_del(&req->list); 1159 1160 1160 1161 spin_unlock(&dev->req_lock);
+31 -57
drivers/usb/gadget/udc/omap_udc.c
··· 2033 2033 { 2034 2034 return machine_is_omap_innovator() 2035 2035 || machine_is_omap_osk() 2036 + || machine_is_omap_palmte() 2036 2037 || machine_is_sx1() 2037 2038 /* No known omap7xx boards with vbus sense */ 2038 2039 || cpu_is_omap7xx(); ··· 2042 2041 static int omap_udc_start(struct usb_gadget *g, 2043 2042 struct usb_gadget_driver *driver) 2044 2043 { 2045 - int status = -ENODEV; 2044 + int status; 2046 2045 struct omap_ep *ep; 2047 2046 unsigned long flags; 2048 2047 ··· 2080 2079 goto done; 2081 2080 } 2082 2081 } else { 2082 + status = 0; 2083 2083 if (can_pullup(udc)) 2084 2084 pullup_enable(udc); 2085 2085 else ··· 2595 2593 2596 2594 static void omap_udc_release(struct device *dev) 2597 2595 { 2598 - complete(udc->done); 2596 + pullup_disable(udc); 2597 + if (!IS_ERR_OR_NULL(udc->transceiver)) { 2598 + usb_put_phy(udc->transceiver); 2599 + udc->transceiver = NULL; 2600 + } 2601 + omap_writew(0, UDC_SYSCON1); 2602 + remove_proc_file(); 2603 + if (udc->dc_clk) { 2604 + if (udc->clk_requested) 2605 + omap_udc_enable_clock(0); 2606 + clk_put(udc->hhc_clk); 2607 + clk_put(udc->dc_clk); 2608 + } 2609 + if (udc->done) 2610 + complete(udc->done); 2599 2611 kfree(udc); 2600 - udc = NULL; 2601 2612 } 2602 2613 2603 2614 static int ··· 2642 2627 udc->gadget.speed = USB_SPEED_UNKNOWN; 2643 2628 udc->gadget.max_speed = USB_SPEED_FULL; 2644 2629 udc->gadget.name = driver_name; 2630 + udc->gadget.quirk_ep_out_aligned_size = 1; 2645 2631 udc->transceiver = xceiv; 2646 2632 2647 2633 /* ep0 is special; put it right after the SETUP buffer */ ··· 2883 2867 udc->clr_halt = UDC_RESET_EP; 2884 2868 2885 2869 /* USB general purpose IRQ: ep0, state changes, dma, etc */ 2886 - status = request_irq(pdev->resource[1].start, omap_udc_irq, 2887 - 0, driver_name, udc); 2870 + status = devm_request_irq(&pdev->dev, pdev->resource[1].start, 2871 + omap_udc_irq, 0, driver_name, udc); 2888 2872 if (status != 0) { 2889 2873 ERR("can't get irq %d, err %d\n", 2890 2874 (int) pdev->resource[1].start, status); ··· 2892 2876 } 2893 2877 2894 2878 /* USB "non-iso" IRQ (PIO for all but ep0) */ 2895 - status = request_irq(pdev->resource[2].start, omap_udc_pio_irq, 2896 - 0, "omap_udc pio", udc); 2879 + status = devm_request_irq(&pdev->dev, pdev->resource[2].start, 2880 + omap_udc_pio_irq, 0, "omap_udc pio", udc); 2897 2881 if (status != 0) { 2898 2882 ERR("can't get irq %d, err %d\n", 2899 2883 (int) pdev->resource[2].start, status); 2900 - goto cleanup2; 2884 + goto cleanup1; 2901 2885 } 2902 2886 #ifdef USE_ISO 2903 - status = request_irq(pdev->resource[3].start, omap_udc_iso_irq, 2904 - 0, "omap_udc iso", udc); 2887 + status = devm_request_irq(&pdev->dev, pdev->resource[3].start, 2888 + omap_udc_iso_irq, 0, "omap_udc iso", udc); 2905 2889 if (status != 0) { 2906 2890 ERR("can't get irq %d, err %d\n", 2907 2891 (int) pdev->resource[3].start, status); 2908 - goto cleanup3; 2892 + goto cleanup1; 2909 2893 } 2910 2894 #endif 2911 2895 if (cpu_is_omap16xx() || cpu_is_omap7xx()) { ··· 2916 2900 } 2917 2901 2918 2902 create_proc_file(); 2919 - status = usb_add_gadget_udc_release(&pdev->dev, &udc->gadget, 2920 - omap_udc_release); 2921 - if (status) 2922 - goto cleanup4; 2923 - 2924 - return 0; 2925 - 2926 - cleanup4: 2927 - remove_proc_file(); 2928 - 2929 - #ifdef USE_ISO 2930 - cleanup3: 2931 - free_irq(pdev->resource[2].start, udc); 2932 - #endif 2933 - 2934 - cleanup2: 2935 - free_irq(pdev->resource[1].start, udc); 2903 + return usb_add_gadget_udc_release(&pdev->dev, &udc->gadget, 2904 + omap_udc_release); 2936 2905 2937 2906 cleanup1: 2938 2907 kfree(udc); ··· 2944 2943 { 2945 2944 DECLARE_COMPLETION_ONSTACK(done); 2946 2945 2947 - if (!udc) 2948 - return -ENODEV; 2949 - 2950 - usb_del_gadget_udc(&udc->gadget); 2951 - if (udc->driver) 2952 - return -EBUSY; 2953 - 2954 2946 udc->done = &done; 2955 2947 2956 - pullup_disable(udc); 2957 - if (!IS_ERR_OR_NULL(udc->transceiver)) { 2958 - usb_put_phy(udc->transceiver); 2959 - udc->transceiver = NULL; 2960 - } 2961 - omap_writew(0, UDC_SYSCON1); 2948 + usb_del_gadget_udc(&udc->gadget); 2962 2949 2963 - remove_proc_file(); 2964 - 2965 - #ifdef USE_ISO 2966 - free_irq(pdev->resource[3].start, udc); 2967 - #endif 2968 - free_irq(pdev->resource[2].start, udc); 2969 - free_irq(pdev->resource[1].start, udc); 2970 - 2971 - if (udc->dc_clk) { 2972 - if (udc->clk_requested) 2973 - omap_udc_enable_clock(0); 2974 - clk_put(udc->hhc_clk); 2975 - clk_put(udc->dc_clk); 2976 - } 2950 + wait_for_completion(&done); 2977 2951 2978 2952 release_mem_region(pdev->resource[0].start, 2979 2953 pdev->resource[0].end - pdev->resource[0].start + 1); 2980 - 2981 - wait_for_completion(&done); 2982 2954 2983 2955 return 0; 2984 2956 }
+10
drivers/usb/storage/unusual_realtek.h
··· 27 27 "USB Card Reader", 28 28 USB_SC_DEVICE, USB_PR_DEVICE, init_realtek_cr, 0), 29 29 30 + UNUSUAL_DEV(0x0bda, 0x0177, 0x0000, 0x9999, 31 + "Realtek", 32 + "USB Card Reader", 33 + USB_SC_DEVICE, USB_PR_DEVICE, init_realtek_cr, 0), 34 + 35 + UNUSUAL_DEV(0x0bda, 0x0184, 0x0000, 0x9999, 36 + "Realtek", 37 + "USB Card Reader", 38 + USB_SC_DEVICE, USB_PR_DEVICE, init_realtek_cr, 0), 39 + 30 40 #endif /* defined(CONFIG_USB_STORAGE_REALTEK) || ... */