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

Pull USB / PHY driver fixes from Greg KH:
"Here are a few small USB and PHY driver fixes for 5.10-rc6. They
include:

- small PHY driver fixes to resolve reported issues

- USB quirks added for "broken" devices

- typec fixes for reported problems

- USB gadget fixes for small issues

Full details are in the shortlog, nothing major in here and all have
been in linux-next with no reported issues"

* tag 'usb-5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
usb: typec: stusb160x: fix power-opmode property with typec-power-opmode
USB: core: Change %pK for __user pointers to %px
USB: core: Fix regression in Hercules audio card
usb: gadget: Fix memleak in gadgetfs_fill_super
usb: gadget: f_midi: Fix memleak in f_midi_alloc
USB: quirks: Add USB_QUIRK_DISCONNECT_SUSPEND quirk for Lenovo A630Z TIO built-in usb-audio card
usb: typec: qcom-pmic-typec: fix builtin build errors
phy: mediatek: fix spelling mistake in Kconfig "veriosn" -> "version"
phy: qualcomm: Fix 28 nm Hi-Speed USB PHY OF dependency
phy: qualcomm: usb: Fix SuperSpeed PHY OF dependency
phy: intel: PHY_INTEL_KEEMBAY_EMMC should depend on ARCH_KEEMBAY
usb: cdns3: gadget: calculate TD_SIZE based on TD
usb: cdns3: gadget: initialize link_trb as NULL
phy: cpcap-usb: Use IRQF_ONESHOT
phy: qcom-qmp: Initialize another pointer to NULL
phy: tegra: xusb: Fix dangling pointer on probe failure
phy: usb: Fix incorrect clearing of tca_drv_sel bit in SETUP reg for 7211

+51 -34
-5
drivers/phy/broadcom/phy-brcm-usb-init-synopsys.c
··· 270 270 reg |= params->mode << USB_PHY_UTMI_CTL_1_PHY_MODE_SHIFT; 271 271 brcm_usb_writel(reg, usb_phy + USB_PHY_UTMI_CTL_1); 272 272 273 - /* Fix the incorrect default */ 274 - reg = brcm_usb_readl(ctrl + USB_CTRL_SETUP); 275 - reg &= ~USB_CTRL_SETUP_tca_drv_sel_MASK; 276 - brcm_usb_writel(reg, ctrl + USB_CTRL_SETUP); 277 - 278 273 usb_init_common(params); 279 274 280 275 /*
+1 -1
drivers/phy/intel/Kconfig
··· 4 4 # 5 5 config PHY_INTEL_KEEMBAY_EMMC 6 6 tristate "Intel Keem Bay EMMC PHY driver" 7 - depends on (OF && ARM64) || COMPILE_TEST 7 + depends on ARCH_KEEMBAY || COMPILE_TEST 8 8 depends on HAS_IOMEM 9 9 select GENERIC_PHY 10 10 select REGMAP_MMIO
+1 -1
drivers/phy/mediatek/Kconfig
··· 12 12 it supports multiple usb2.0, usb3.0 ports, PCIe and 13 13 SATA, and meanwhile supports two version T-PHY which have 14 14 different banks layout, the T-PHY with shared banks between 15 - multi-ports is first version, otherwise is second veriosn, 15 + multi-ports is first version, otherwise is second version, 16 16 so you can easily distinguish them by banks layout. 17 17 18 18 config PHY_MTK_UFS
+2 -1
drivers/phy/motorola/phy-cpcap-usb.c
··· 364 364 365 365 error = devm_request_threaded_irq(ddata->dev, irq, NULL, 366 366 cpcap_phy_irq_thread, 367 - IRQF_SHARED, 367 + IRQF_SHARED | 368 + IRQF_ONESHOT, 368 369 name, ddata); 369 370 if (error) { 370 371 dev_err(ddata->dev, "could not get irq %s: %i\n",
+2 -2
drivers/phy/qualcomm/Kconfig
··· 87 87 88 88 config PHY_QCOM_USB_HS_28NM 89 89 tristate "Qualcomm 28nm High-Speed PHY" 90 - depends on ARCH_QCOM || COMPILE_TEST 90 + depends on OF && (ARCH_QCOM || COMPILE_TEST) 91 91 depends on EXTCON || !EXTCON # if EXTCON=m, this cannot be built-in 92 92 select GENERIC_PHY 93 93 help ··· 98 98 99 99 config PHY_QCOM_USB_SS 100 100 tristate "Qualcomm USB Super-Speed PHY driver" 101 - depends on ARCH_QCOM || COMPILE_TEST 101 + depends on OF && (ARCH_QCOM || COMPILE_TEST) 102 102 depends on EXTCON || !EXTCON # if EXTCON=m, this cannot be built-in 103 103 select GENERIC_PHY 104 104 help
+1 -1
drivers/phy/qualcomm/phy-qcom-qmp.c
··· 3926 3926 struct phy_provider *phy_provider; 3927 3927 void __iomem *serdes; 3928 3928 void __iomem *usb_serdes; 3929 - void __iomem *dp_serdes; 3929 + void __iomem *dp_serdes = NULL; 3930 3930 const struct qmp_phy_combo_cfg *combo_cfg = NULL; 3931 3931 const struct qmp_phy_cfg *cfg = NULL; 3932 3932 const struct qmp_phy_cfg *usb_cfg = NULL;
+1
drivers/phy/tegra/xusb.c
··· 1242 1242 reset: 1243 1243 reset_control_assert(padctl->rst); 1244 1244 remove: 1245 + platform_set_drvdata(pdev, NULL); 1245 1246 soc->ops->remove(padctl); 1246 1247 return err; 1247 1248 }
+14 -12
drivers/usb/cdns3/gadget.c
··· 1114 1114 struct cdns3_device *priv_dev = priv_ep->cdns3_dev; 1115 1115 struct cdns3_request *priv_req; 1116 1116 struct cdns3_trb *trb; 1117 - struct cdns3_trb *link_trb; 1117 + struct cdns3_trb *link_trb = NULL; 1118 1118 dma_addr_t trb_dma; 1119 1119 u32 togle_pcs = 1; 1120 1120 int sg_iter = 0; ··· 1193 1193 1194 1194 /* set incorrect Cycle Bit for first trb*/ 1195 1195 control = priv_ep->pcs ? 0 : TRB_CYCLE; 1196 + trb->length = 0; 1197 + if (priv_dev->dev_ver >= DEV_VER_V2) { 1198 + u16 td_size; 1199 + 1200 + td_size = DIV_ROUND_UP(request->length, 1201 + priv_ep->endpoint.maxpacket); 1202 + if (priv_dev->gadget.speed == USB_SPEED_SUPER) 1203 + trb->length = TRB_TDL_SS_SIZE(td_size); 1204 + else 1205 + control |= TRB_TDL_HS_SIZE(td_size); 1206 + } 1196 1207 1197 1208 do { 1198 1209 u32 length; 1199 - u16 td_size = 0; 1200 1210 1201 1211 /* fill TRB */ 1202 1212 control |= TRB_TYPE(TRB_NORMAL); ··· 1218 1208 length = request->length; 1219 1209 } 1220 1210 1221 - if (likely(priv_dev->dev_ver >= DEV_VER_V2)) 1222 - td_size = DIV_ROUND_UP(length, 1223 - priv_ep->endpoint.maxpacket); 1224 - else if (priv_ep->flags & EP_TDLCHK_EN) 1211 + if (priv_ep->flags & EP_TDLCHK_EN) 1225 1212 total_tdl += DIV_ROUND_UP(length, 1226 1213 priv_ep->endpoint.maxpacket); 1227 1214 1228 - trb->length = cpu_to_le32(TRB_BURST_LEN(priv_ep->trb_burst_size) | 1215 + trb->length |= cpu_to_le32(TRB_BURST_LEN(priv_ep->trb_burst_size) | 1229 1216 TRB_LEN(length)); 1230 - if (priv_dev->gadget.speed == USB_SPEED_SUPER) 1231 - trb->length |= cpu_to_le32(TRB_TDL_SS_SIZE(td_size)); 1232 - else 1233 - control |= TRB_TDL_HS_SIZE(td_size); 1234 - 1235 1217 pcs = priv_ep->pcs ? TRB_CYCLE : 0; 1236 1218 1237 1219 /*
+7 -7
drivers/usb/core/devio.c
··· 482 482 483 483 if (userurb) { /* Async */ 484 484 if (when == SUBMIT) 485 - dev_info(&udev->dev, "userurb %pK, ep%d %s-%s, " 485 + dev_info(&udev->dev, "userurb %px, ep%d %s-%s, " 486 486 "length %u\n", 487 487 userurb, ep, t, d, length); 488 488 else 489 - dev_info(&udev->dev, "userurb %pK, ep%d %s-%s, " 489 + dev_info(&udev->dev, "userurb %px, ep%d %s-%s, " 490 490 "actual_length %u status %d\n", 491 491 userurb, ep, t, d, length, 492 492 timeout_or_status); ··· 1997 1997 if (as) { 1998 1998 int retval; 1999 1999 2000 - snoop(&ps->dev->dev, "reap %pK\n", as->userurb); 2000 + snoop(&ps->dev->dev, "reap %px\n", as->userurb); 2001 2001 retval = processcompl(as, (void __user * __user *)arg); 2002 2002 free_async(as); 2003 2003 return retval; ··· 2014 2014 2015 2015 as = async_getcompleted(ps); 2016 2016 if (as) { 2017 - snoop(&ps->dev->dev, "reap %pK\n", as->userurb); 2017 + snoop(&ps->dev->dev, "reap %px\n", as->userurb); 2018 2018 retval = processcompl(as, (void __user * __user *)arg); 2019 2019 free_async(as); 2020 2020 } else { ··· 2142 2142 if (as) { 2143 2143 int retval; 2144 2144 2145 - snoop(&ps->dev->dev, "reap %pK\n", as->userurb); 2145 + snoop(&ps->dev->dev, "reap %px\n", as->userurb); 2146 2146 retval = processcompl_compat(as, (void __user * __user *)arg); 2147 2147 free_async(as); 2148 2148 return retval; ··· 2159 2159 2160 2160 as = async_getcompleted(ps); 2161 2161 if (as) { 2162 - snoop(&ps->dev->dev, "reap %pK\n", as->userurb); 2162 + snoop(&ps->dev->dev, "reap %px\n", as->userurb); 2163 2163 retval = processcompl_compat(as, (void __user * __user *)arg); 2164 2164 free_async(as); 2165 2165 } else { ··· 2624 2624 #endif 2625 2625 2626 2626 case USBDEVFS_DISCARDURB: 2627 - snoop(&dev->dev, "%s: DISCARDURB %pK\n", __func__, p); 2627 + snoop(&dev->dev, "%s: DISCARDURB %px\n", __func__, p); 2628 2628 ret = proc_unlinkurb(ps, p); 2629 2629 break; 2630 2630
+10
drivers/usb/core/quirks.c
··· 348 348 /* Guillemot Webcam Hercules Dualpix Exchange*/ 349 349 { USB_DEVICE(0x06f8, 0x3005), .driver_info = USB_QUIRK_RESET_RESUME }, 350 350 351 + /* Guillemot Hercules DJ Console audio card (BZ 208357) */ 352 + { USB_DEVICE(0x06f8, 0xb000), .driver_info = 353 + USB_QUIRK_ENDPOINT_IGNORE }, 354 + 351 355 /* Midiman M-Audio Keystation 88es */ 352 356 { USB_DEVICE(0x0763, 0x0192), .driver_info = USB_QUIRK_RESET_RESUME }, 353 357 ··· 424 420 /* Razer - Razer Blade Keyboard */ 425 421 { USB_DEVICE(0x1532, 0x0116), .driver_info = 426 422 USB_QUIRK_LINEAR_UFRAME_INTR_BINTERVAL }, 423 + 424 + /* Lenovo ThinkCenter A630Z TI024Gen3 usb-audio */ 425 + { USB_DEVICE(0x17ef, 0xa012), .driver_info = 426 + USB_QUIRK_DISCONNECT_SUSPEND }, 427 427 428 428 /* BUILDWIN Photo Frame */ 429 429 { USB_DEVICE(0x1908, 0x1315), .driver_info = ··· 529 521 * Matched for devices with USB_QUIRK_ENDPOINT_IGNORE. 530 522 */ 531 523 static const struct usb_device_id usb_endpoint_ignore[] = { 524 + { USB_DEVICE_INTERFACE_NUMBER(0x06f8, 0xb000, 5), .driver_info = 0x01 }, 525 + { USB_DEVICE_INTERFACE_NUMBER(0x06f8, 0xb000, 5), .driver_info = 0x81 }, 532 526 { USB_DEVICE_INTERFACE_NUMBER(0x0926, 0x0202, 1), .driver_info = 0x85 }, 533 527 { USB_DEVICE_INTERFACE_NUMBER(0x0926, 0x0208, 1), .driver_info = 0x85 }, 534 528 { }
+7 -3
drivers/usb/gadget/function/f_midi.c
··· 1315 1315 midi->id = kstrdup(opts->id, GFP_KERNEL); 1316 1316 if (opts->id && !midi->id) { 1317 1317 status = -ENOMEM; 1318 - goto setup_fail; 1318 + goto midi_free; 1319 1319 } 1320 1320 midi->in_ports = opts->in_ports; 1321 1321 midi->out_ports = opts->out_ports; ··· 1327 1327 1328 1328 status = kfifo_alloc(&midi->in_req_fifo, midi->qlen, GFP_KERNEL); 1329 1329 if (status) 1330 - goto setup_fail; 1330 + goto midi_free; 1331 1331 1332 1332 spin_lock_init(&midi->transmit_lock); 1333 1333 ··· 1343 1343 1344 1344 return &midi->func; 1345 1345 1346 + midi_free: 1347 + if (midi) 1348 + kfree(midi->id); 1349 + kfree(midi); 1346 1350 setup_fail: 1347 1351 mutex_unlock(&opts->lock); 1348 - kfree(midi); 1352 + 1349 1353 return ERR_PTR(status); 1350 1354 } 1351 1355
+3
drivers/usb/gadget/legacy/inode.c
··· 2039 2039 return 0; 2040 2040 2041 2041 Enomem: 2042 + kfree(CHIP); 2043 + CHIP = NULL; 2044 + 2042 2045 return -ENOMEM; 2043 2046 } 2044 2047
+1
drivers/usb/typec/Kconfig
··· 88 88 config TYPEC_QCOM_PMIC 89 89 tristate "Qualcomm PMIC USB Type-C driver" 90 90 depends on ARCH_QCOM || COMPILE_TEST 91 + depends on USB_ROLE_SWITCH || !USB_ROLE_SWITCH 91 92 help 92 93 Driver for supporting role switch over the Qualcomm PMIC. This will 93 94 handle the USB Type-C role and orientation detection reported by the
+1 -1
drivers/usb/typec/stusb160x.c
··· 562 562 * Supported power operation mode can be configured through device tree 563 563 * else it is read from chip registers in stusb160x_get_caps. 564 564 */ 565 - ret = fwnode_property_read_string(fwnode, "power-opmode", &cap_str); 565 + ret = fwnode_property_read_string(fwnode, "typec-power-opmode", &cap_str); 566 566 if (!ret) { 567 567 ret = typec_find_pwr_opmode(cap_str); 568 568 /* Power delivery not yet supported */