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

Pull USB fixes from Greg KH:
"Here are some USB and PHY fixes for 4.2-rc6 that resolve some reported
issues.

All of these have been in the linux-next tree for a while, full
details on the patches are in the shortlog below"

* tag 'usb-4.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
ARM: dts: dra7: Add syscon-pllreset syscon to SATA PHY
drivers/usb: Delete XHCI command timer if necessary
xhci: fix off by one error in TRB DMA address boundary check
usb: udc: core: add device_del() call to error pathway
phy: ti-pipe3: i783 workaround for SATA lockup after dpll unlock/relock
phy-sun4i-usb: Add missing EXPORT_SYMBOL_GPL for sun4i_usb_phy_set_squelch_detect
USB: sierra: add 1199:68AB device ID
usb: gadget: f_printer: actually limit the number of instances
usb: gadget: f_hid: actually limit the number of instances
usb: gadget: f_uac2: fix calculation of uac2->p_interval
usb: gadget: bdc: fix a driver crash on disconnect
usb: chipidea: ehci_init_driver is intended to call one time
USB: qcserial: Add support for Dell Wireless 5809e 4G Modem
USB: qcserial/option: make AT URCs work for Sierra Wireless MC7305/MC7355

+120 -16
+16
Documentation/devicetree/bindings/phy/ti-phy.txt
··· 82 82 - id: If there are multiple instance of the same type, in order to 83 83 differentiate between each instance "id" can be used (e.g., multi-lane PCIe 84 84 PHY). If "id" is not provided, it is set to default value of '1'. 85 + - syscon-pllreset: Handle to system control region that contains the 86 + CTRL_CORE_SMA_SW_0 register and register offset to the CTRL_CORE_SMA_SW_0 87 + register that contains the SATA_PLL_SOFT_RESET bit. Only valid for sata_phy. 85 88 86 89 This is usually a subnode of ocp2scp to which it is connected. 87 90 ··· 102 99 clock-names = "wkupclk", 103 100 "sysclk", 104 101 "refclk"; 102 + }; 103 + 104 + sata_phy: phy@4A096000 { 105 + compatible = "ti,phy-pipe3-sata"; 106 + reg = <0x4A096000 0x80>, /* phy_rx */ 107 + <0x4A096400 0x64>, /* phy_tx */ 108 + <0x4A096800 0x40>; /* pll_ctrl */ 109 + reg-names = "phy_rx", "phy_tx", "pll_ctrl"; 110 + ctrl-module = <&omap_control_sata>; 111 + clocks = <&sys_clkin1>, <&sata_ref_clk>; 112 + clock-names = "sysclk", "refclk"; 113 + syscon-pllreset = <&scm_conf 0x3fc>; 114 + #phy-cells = <0>; 105 115 };
+1
arch/arm/boot/dts/dra7.dtsi
··· 1140 1140 ctrl-module = <&omap_control_sata>; 1141 1141 clocks = <&sys_clkin1>, <&sata_ref_clk>; 1142 1142 clock-names = "sysclk", "refclk"; 1143 + syscon-pllreset = <&scm_conf 0x3fc>; 1143 1144 #phy-cells = <0>; 1144 1145 }; 1145 1146
+1
drivers/phy/phy-sun4i-usb.c
··· 212 212 213 213 sun4i_usb_phy_write(phy, PHY_SQUELCH_DETECT, enabled ? 0 : 2, 2); 214 214 } 215 + EXPORT_SYMBOL_GPL(sun4i_usb_phy_set_squelch_detect); 215 216 216 217 static struct phy_ops sun4i_usb_phy_ops = { 217 218 .init = sun4i_usb_phy_init,
+55 -6
drivers/phy/phy-ti-pipe3.c
··· 28 28 #include <linux/delay.h> 29 29 #include <linux/phy/omap_control_phy.h> 30 30 #include <linux/of_platform.h> 31 + #include <linux/mfd/syscon.h> 32 + #include <linux/regmap.h> 31 33 32 34 #define PLL_STATUS 0x00000004 33 35 #define PLL_GO 0x00000008 ··· 53 51 #define PLL_TICOPWDN BIT(16) 54 52 #define PLL_LOCK 0x2 55 53 #define PLL_IDLE 0x1 54 + 55 + #define SATA_PLL_SOFT_RESET BIT(18) 56 56 57 57 /* 58 58 * This is an Empirical value that works, need to confirm the actual ··· 86 82 struct clk *refclk; 87 83 struct clk *div_clk; 88 84 struct pipe3_dpll_map *dpll_map; 85 + struct regmap *dpll_reset_syscon; /* ctrl. reg. acces */ 86 + unsigned int dpll_reset_reg; /* reg. index within syscon */ 87 + bool sata_refclk_enabled; 89 88 }; 90 89 91 90 static struct pipe3_dpll_map dpll_map_usb[] = { ··· 256 249 u32 val; 257 250 unsigned long timeout; 258 251 259 - /* SATA DPLL can't be powered down due to Errata i783 */ 260 - if (of_device_is_compatible(phy->dev->of_node, "ti,phy-pipe3-sata")) 252 + /* If dpll_reset_syscon is not present we wont power down SATA DPLL 253 + * due to Errata i783 254 + */ 255 + if (of_device_is_compatible(phy->dev->of_node, "ti,phy-pipe3-sata") && 256 + !phy->dpll_reset_syscon) 261 257 return 0; 262 258 263 259 /* PCIe doesn't have internal DPLL */ ··· 284 274 val); 285 275 return -EBUSY; 286 276 } 277 + } 278 + 279 + /* i783: SATA needs control bit toggle after PLL unlock */ 280 + if (of_device_is_compatible(phy->dev->of_node, "ti,phy-pipe3-sata")) { 281 + regmap_update_bits(phy->dpll_reset_syscon, phy->dpll_reset_reg, 282 + SATA_PLL_SOFT_RESET, SATA_PLL_SOFT_RESET); 283 + regmap_update_bits(phy->dpll_reset_syscon, phy->dpll_reset_reg, 284 + SATA_PLL_SOFT_RESET, 0); 287 285 } 288 286 289 287 ti_pipe3_disable_clocks(phy); ··· 368 350 } 369 351 } else { 370 352 phy->wkupclk = ERR_PTR(-ENODEV); 353 + phy->dpll_reset_syscon = syscon_regmap_lookup_by_phandle(node, 354 + "syscon-pllreset"); 355 + if (IS_ERR(phy->dpll_reset_syscon)) { 356 + dev_info(&pdev->dev, 357 + "can't get syscon-pllreset, sata dpll won't idle\n"); 358 + phy->dpll_reset_syscon = NULL; 359 + } else { 360 + if (of_property_read_u32_index(node, 361 + "syscon-pllreset", 1, 362 + &phy->dpll_reset_reg)) { 363 + dev_err(&pdev->dev, 364 + "couldn't get pllreset reg. offset\n"); 365 + return -EINVAL; 366 + } 367 + } 371 368 } 372 369 373 370 if (of_device_is_compatible(node, "ti,phy-pipe3-pcie")) { ··· 435 402 436 403 platform_set_drvdata(pdev, phy); 437 404 pm_runtime_enable(phy->dev); 438 - /* Prevent auto-disable of refclk for SATA PHY due to Errata i783 */ 439 - if (of_device_is_compatible(node, "ti,phy-pipe3-sata")) 440 - if (!IS_ERR(phy->refclk)) 405 + 406 + /* 407 + * Prevent auto-disable of refclk for SATA PHY due to Errata i783 408 + */ 409 + if (of_device_is_compatible(node, "ti,phy-pipe3-sata")) { 410 + if (!IS_ERR(phy->refclk)) { 441 411 clk_prepare_enable(phy->refclk); 412 + phy->sata_refclk_enabled = true; 413 + } 414 + } 442 415 443 416 generic_phy = devm_phy_create(phy->dev, NULL, &ops); 444 417 if (IS_ERR(generic_phy)) ··· 511 472 { 512 473 if (!IS_ERR(phy->wkupclk)) 513 474 clk_disable_unprepare(phy->wkupclk); 514 - if (!IS_ERR(phy->refclk)) 475 + if (!IS_ERR(phy->refclk)) { 515 476 clk_disable_unprepare(phy->refclk); 477 + /* 478 + * SATA refclk needs an additional disable as we left it 479 + * on in probe to avoid Errata i783 480 + */ 481 + if (phy->sata_refclk_enabled) { 482 + clk_disable_unprepare(phy->refclk); 483 + phy->sata_refclk_enabled = false; 484 + } 485 + } 486 + 516 487 if (!IS_ERR(phy->div_clk)) 517 488 clk_disable_unprepare(phy->div_clk); 518 489 }
+12 -1
drivers/usb/chipidea/core.c
··· 1024 1024 }, 1025 1025 }; 1026 1026 1027 - module_platform_driver(ci_hdrc_driver); 1027 + static int __init ci_hdrc_platform_register(void) 1028 + { 1029 + ci_hdrc_host_driver_init(); 1030 + return platform_driver_register(&ci_hdrc_driver); 1031 + } 1032 + module_init(ci_hdrc_platform_register); 1033 + 1034 + static void __exit ci_hdrc_platform_unregister(void) 1035 + { 1036 + platform_driver_unregister(&ci_hdrc_driver); 1037 + } 1038 + module_exit(ci_hdrc_platform_unregister); 1028 1039 1029 1040 MODULE_ALIAS("platform:ci_hdrc"); 1030 1041 MODULE_LICENSE("GPL v2");
+5 -2
drivers/usb/chipidea/host.c
··· 249 249 rdrv->name = "host"; 250 250 ci->roles[CI_ROLE_HOST] = rdrv; 251 251 252 + return 0; 253 + } 254 + 255 + void ci_hdrc_host_driver_init(void) 256 + { 252 257 ehci_init_driver(&ci_ehci_hc_driver, &ehci_ci_overrides); 253 258 orig_bus_suspend = ci_ehci_hc_driver.bus_suspend; 254 259 ci_ehci_hc_driver.bus_suspend = ci_ehci_bus_suspend; 255 - 256 - return 0; 257 260 }
+6
drivers/usb/chipidea/host.h
··· 5 5 6 6 int ci_hdrc_host_init(struct ci_hdrc *ci); 7 7 void ci_hdrc_host_destroy(struct ci_hdrc *ci); 8 + void ci_hdrc_host_driver_init(void); 8 9 9 10 #else 10 11 ··· 15 14 } 16 15 17 16 static inline void ci_hdrc_host_destroy(struct ci_hdrc *ci) 17 + { 18 + 19 + } 20 + 21 + static void ci_hdrc_host_driver_init(void) 18 22 { 19 23 20 24 }
+4
drivers/usb/gadget/function/f_hid.c
··· 699 699 int ret; 700 700 701 701 ret = ida_simple_get(&hidg_ida, 0, 0, GFP_KERNEL); 702 + if (ret >= HIDG_MINORS) { 703 + ida_simple_remove(&hidg_ida, ret); 704 + ret = -ENODEV; 705 + } 702 706 703 707 return ret; 704 708 }
+9 -1
drivers/usb/gadget/function/f_printer.c
··· 1248 1248 1249 1249 static inline int gprinter_get_minor(void) 1250 1250 { 1251 - return ida_simple_get(&printer_ida, 0, 0, GFP_KERNEL); 1251 + int ret; 1252 + 1253 + ret = ida_simple_get(&printer_ida, 0, 0, GFP_KERNEL); 1254 + if (ret >= PRINTER_MINORS) { 1255 + ida_simple_remove(&printer_ida, ret); 1256 + ret = -ENODEV; 1257 + } 1258 + 1259 + return ret; 1252 1260 } 1253 1261 1254 1262 static inline void gprinter_put_minor(int minor)
+2 -2
drivers/usb/gadget/function/f_uac2.c
··· 1162 1162 factor = 1000; 1163 1163 } else { 1164 1164 ep_desc = &hs_epin_desc; 1165 - factor = 125; 1165 + factor = 8000; 1166 1166 } 1167 1167 1168 1168 /* pre-compute some values for iso_complete() */ 1169 1169 uac2->p_framesize = opts->p_ssize * 1170 1170 num_channels(opts->p_chmask); 1171 1171 rate = opts->p_srate * uac2->p_framesize; 1172 - uac2->p_interval = (1 << (ep_desc->bInterval - 1)) * factor; 1172 + uac2->p_interval = factor / (1 << (ep_desc->bInterval - 1)); 1173 1173 uac2->p_pktsize = min_t(unsigned int, rate / uac2->p_interval, 1174 1174 prm->max_psize); 1175 1175
+1 -1
drivers/usb/gadget/udc/bdc/bdc_ep.c
··· 779 779 /* The current hw dequeue pointer */ 780 780 tmp_32 = bdc_readl(bdc->regs, BDC_EPSTS0(0)); 781 781 deq_ptr_64 = tmp_32; 782 - tmp_32 = bdc_readl(bdc->regs, BDC_EPSTS0(1)); 782 + tmp_32 = bdc_readl(bdc->regs, BDC_EPSTS1(0)); 783 783 deq_ptr_64 |= ((u64)tmp_32 << 32); 784 784 785 785 /* we have the dma addr of next bd that will be fetched by hardware */
+1
drivers/usb/gadget/udc/udc-core.c
··· 323 323 324 324 err3: 325 325 put_device(&udc->dev); 326 + device_del(&gadget->dev); 326 327 327 328 err2: 328 329 put_device(&gadget->dev);
+2 -1
drivers/usb/host/xhci-mem.c
··· 1792 1792 int size; 1793 1793 int i, j, num_ports; 1794 1794 1795 - del_timer_sync(&xhci->cmd_timer); 1795 + if (timer_pending(&xhci->cmd_timer)) 1796 + del_timer_sync(&xhci->cmd_timer); 1796 1797 1797 1798 /* Free the Event Ring Segment Table and the actual Event Ring */ 1798 1799 size = sizeof(struct xhci_erst_entry)*(xhci->erst.num_entries);
+1 -1
drivers/usb/host/xhci-ring.c
··· 82 82 return 0; 83 83 /* offset in TRBs */ 84 84 segment_offset = trb - seg->trbs; 85 - if (segment_offset > TRBS_PER_SEGMENT) 85 + if (segment_offset >= TRBS_PER_SEGMENT) 86 86 return 0; 87 87 return seg->dma + (segment_offset * sizeof(*trb)); 88 88 }
+2
drivers/usb/serial/option.c
··· 1099 1099 { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000)}, /* SIMCom SIM5218 */ 1100 1100 { USB_DEVICE_INTERFACE_CLASS(SIERRA_VENDOR_ID, 0x68c0, 0xff), 1101 1101 .driver_info = (kernel_ulong_t)&sierra_mc73xx_blacklist }, /* MC73xx */ 1102 + { USB_DEVICE_INTERFACE_CLASS(SIERRA_VENDOR_ID, 0x9041, 0xff), 1103 + .driver_info = (kernel_ulong_t)&sierra_mc73xx_blacklist }, /* MC7305/MC7355 */ 1102 1104 { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6001) }, 1103 1105 { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CMU_300) }, 1104 1106 { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6003),
+1 -1
drivers/usb/serial/qcserial.c
··· 145 145 {DEVICE_SWI(0x1199, 0x901c)}, /* Sierra Wireless EM7700 */ 146 146 {DEVICE_SWI(0x1199, 0x901f)}, /* Sierra Wireless EM7355 */ 147 147 {DEVICE_SWI(0x1199, 0x9040)}, /* Sierra Wireless Modem */ 148 - {DEVICE_SWI(0x1199, 0x9041)}, /* Sierra Wireless MC7305/MC7355 */ 149 148 {DEVICE_SWI(0x1199, 0x9051)}, /* Netgear AirCard 340U */ 150 149 {DEVICE_SWI(0x1199, 0x9053)}, /* Sierra Wireless Modem */ 151 150 {DEVICE_SWI(0x1199, 0x9054)}, /* Sierra Wireless Modem */ ··· 157 158 {DEVICE_SWI(0x413c, 0x81a4)}, /* Dell Wireless 5570e HSPA+ (42Mbps) Mobile Broadband Card */ 158 159 {DEVICE_SWI(0x413c, 0x81a8)}, /* Dell Wireless 5808 Gobi(TM) 4G LTE Mobile Broadband Card */ 159 160 {DEVICE_SWI(0x413c, 0x81a9)}, /* Dell Wireless 5808e Gobi(TM) 4G LTE Mobile Broadband Card */ 161 + {DEVICE_SWI(0x413c, 0x81b1)}, /* Dell Wireless 5809e Gobi(TM) 4G LTE Mobile Broadband Card */ 160 162 161 163 /* Huawei devices */ 162 164 {DEVICE_HWI(0x03f0, 0x581d)}, /* HP lt4112 LTE/HSPA+ Gobi 4G Modem (Huawei me906e) */
+1
drivers/usb/serial/sierra.c
··· 289 289 { USB_DEVICE_AND_INTERFACE_INFO(0x1199, 0x68AA, 0xFF, 0xFF, 0xFF), 290 290 .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist 291 291 }, 292 + { USB_DEVICE(0x1199, 0x68AB) }, /* Sierra Wireless AR8550 */ 292 293 /* AT&T Direct IP LTE modems */ 293 294 { USB_DEVICE_AND_INTERFACE_INFO(0x0F3D, 0x68AA, 0xFF, 0xFF, 0xFF), 294 295 .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist