Skip to content

Commit 7eb8f53

Browse files
committed
Merge tag 'usb-5.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB fixes from Greg KH: "Here are some small USB fixes for 5.8-rc3 to resolve some reported issues. Nothing major here: - gadget driver fixes - cdns3 driver fixes - xhci fixes - renesas_usbhs driver fixes - some new device support with ids - documentation update All of these have been in linux-next with no reported issues" * tag 'usb-5.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (27 commits) usb: renesas_usbhs: getting residue from callback_result Revert "usb: dwc3: exynos: Add support for Exynos5422 suspend clk" xhci: Poll for U0 after disabling USB2 LPM xhci: Return if xHCI doesn't support LPM usb: host: xhci-mtk: avoid runtime suspend when removing hcd xhci: Fix enumeration issue when setting max packet size for FS devices. xhci: Fix incorrect EP_STATE_MASK usb: cdns3: ep0: add spinlock for cdns3_check_new_setup usb: cdns3: trace: using correct dir value usb: cdns3: ep0: fix the test mode set incorrectly Revert "usb: dwc3: exynos: Add support for Exynos5422 suspend clk" usb: gadget: udc: Potential Oops in error handling code usb: phy: tegra: Fix unnecessary check in tegra_usb_phy_probe() usb: dwc3: pci: Fix reference count leak in dwc3_pci_resume_work usb: cdns3: ep0: add spinlock for cdns3_check_new_setup usb: cdns3: trace: using correct dir value usb: cdns3: ep0: fix the test mode set incorrectly usb: typec: tcpci_rt1711h: avoid screaming irq causing boot hangs USB: ohci-sm501: Add missed iounmap() in remove cdc-acm: Add DISABLE_ECHO quirk for Microchip/SMSC chip ...
2 parents fc3ebc3 + ed8fa04 commit 7eb8f53

File tree

22 files changed

+90
-73
lines changed

22 files changed

+90
-73
lines changed

Documentation/ABI/testing/sysfs-platform-chipidea-usb-otg

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
What: /sys/bus/platform/devices/ci_hdrc.0/inputs/a_bus_req
22
Date: Feb 2014
3-
Contact: Li Jun <b47624@freescale.com>
3+
Contact: Li Jun <jun.li@nxp.com>
44
Description:
55
Can be set and read.
66
Set a_bus_req(A-device bus request) input to be 1 if
@@ -17,7 +17,7 @@ Description:
1717

1818
What: /sys/bus/platform/devices/ci_hdrc.0/inputs/a_bus_drop
1919
Date: Feb 2014
20-
Contact: Li Jun <b47624@freescale.com>
20+
Contact: Li Jun <jun.li@nxp.com>
2121
Description:
2222
Can be set and read
2323
The a_bus_drop(A-device bus drop) input is 1 when the
@@ -32,7 +32,7 @@ Description:
3232

3333
What: /sys/bus/platform/devices/ci_hdrc.0/inputs/b_bus_req
3434
Date: Feb 2014
35-
Contact: Li Jun <b47624@freescale.com>
35+
Contact: Li Jun <jun.li@nxp.com>
3636
Description:
3737
Can be set and read.
3838
The b_bus_req(B-device bus request) input is 1 during the time
@@ -47,7 +47,7 @@ Description:
4747

4848
What: /sys/bus/platform/devices/ci_hdrc.0/inputs/a_clr_err
4949
Date: Feb 2014
50-
Contact: Li Jun <b47624@freescale.com>
50+
Contact: Li Jun <jun.li@nxp.com>
5151
Description:
5252
Only can be set.
5353
The a_clr_err(A-device Vbus error clear) input is used to clear

drivers/usb/cdns3/ep0.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,8 @@ static int cdns3_ep0_feature_handle_device(struct cdns3_device *priv_dev,
327327
if (!set || (tmode & 0xff) != 0)
328328
return -EINVAL;
329329

330-
switch (tmode >> 8) {
330+
tmode >>= 8;
331+
switch (tmode) {
331332
case TEST_J:
332333
case TEST_K:
333334
case TEST_SE0_NAK:
@@ -704,15 +705,17 @@ static int cdns3_gadget_ep0_queue(struct usb_ep *ep,
704705
int ret = 0;
705706
u8 zlp = 0;
706707

708+
spin_lock_irqsave(&priv_dev->lock, flags);
707709
trace_cdns3_ep0_queue(priv_dev, request);
708710

709711
/* cancel the request if controller receive new SETUP packet. */
710-
if (cdns3_check_new_setup(priv_dev))
712+
if (cdns3_check_new_setup(priv_dev)) {
713+
spin_unlock_irqrestore(&priv_dev->lock, flags);
711714
return -ECONNRESET;
715+
}
712716

713717
/* send STATUS stage. Should be called only for SET_CONFIGURATION */
714718
if (priv_dev->ep0_stage == CDNS3_STATUS_STAGE) {
715-
spin_lock_irqsave(&priv_dev->lock, flags);
716719
cdns3_select_ep(priv_dev, 0x00);
717720

718721
erdy_sent = !priv_dev->hw_configured_flag;
@@ -737,7 +740,6 @@ static int cdns3_gadget_ep0_queue(struct usb_ep *ep,
737740
return 0;
738741
}
739742

740-
spin_lock_irqsave(&priv_dev->lock, flags);
741743
if (!list_empty(&priv_ep->pending_req_list)) {
742744
dev_err(priv_dev->dev,
743745
"can't handle multiple requests for ep0\n");

drivers/usb/cdns3/trace.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ DECLARE_EVENT_CLASS(cdns3_log_ep0_irq,
156156
__dynamic_array(char, str, CDNS3_MSG_MAX)
157157
),
158158
TP_fast_assign(
159-
__entry->ep_dir = priv_dev->ep0_data_dir;
159+
__entry->ep_dir = priv_dev->selected_ep;
160160
__entry->ep_sts = ep_sts;
161161
),
162162
TP_printk("%s", cdns3_decode_ep0_irq(__get_str(str),

drivers/usb/class/cdc-acm.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1689,6 +1689,8 @@ static int acm_pre_reset(struct usb_interface *intf)
16891689

16901690
static const struct usb_device_id acm_ids[] = {
16911691
/* quirky and broken devices */
1692+
{ USB_DEVICE(0x0424, 0x274e), /* Microchip Technology, Inc. (formerly SMSC) */
1693+
.driver_info = DISABLE_ECHO, }, /* DISABLE ECHO in termios flag */
16921694
{ USB_DEVICE(0x076d, 0x0006), /* Denso Cradle CU-321 */
16931695
.driver_info = NO_UNION_NORMAL, },/* has no union descriptor */
16941696
{ USB_DEVICE(0x17ef, 0x7000), /* Lenovo USB modem */

drivers/usb/core/quirks.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,11 +218,12 @@ static const struct usb_device_id usb_quirk_list[] = {
218218
/* Logitech HD Webcam C270 */
219219
{ USB_DEVICE(0x046d, 0x0825), .driver_info = USB_QUIRK_RESET_RESUME },
220220

221-
/* Logitech HD Pro Webcams C920, C920-C, C925e and C930e */
221+
/* Logitech HD Pro Webcams C920, C920-C, C922, C925e and C930e */
222222
{ USB_DEVICE(0x046d, 0x082d), .driver_info = USB_QUIRK_DELAY_INIT },
223223
{ USB_DEVICE(0x046d, 0x0841), .driver_info = USB_QUIRK_DELAY_INIT },
224224
{ USB_DEVICE(0x046d, 0x0843), .driver_info = USB_QUIRK_DELAY_INIT },
225225
{ USB_DEVICE(0x046d, 0x085b), .driver_info = USB_QUIRK_DELAY_INIT },
226+
{ USB_DEVICE(0x046d, 0x085c), .driver_info = USB_QUIRK_DELAY_INIT },
226227

227228
/* Logitech ConferenceCam CC3000e */
228229
{ USB_DEVICE(0x046d, 0x0847), .driver_info = USB_QUIRK_DELAY_INIT },

drivers/usb/dwc2/gadget.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4920,12 +4920,6 @@ int dwc2_gadget_init(struct dwc2_hsotg *hsotg)
49204920
epnum, 0);
49214921
}
49224922

4923-
ret = usb_add_gadget_udc(dev, &hsotg->gadget);
4924-
if (ret) {
4925-
dwc2_hsotg_ep_free_request(&hsotg->eps_out[0]->ep,
4926-
hsotg->ctrl_req);
4927-
return ret;
4928-
}
49294923
dwc2_hsotg_dump(hsotg);
49304924

49314925
return 0;

drivers/usb/dwc2/platform.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,17 @@ static int dwc2_driver_probe(struct platform_device *dev)
575575
if (hsotg->dr_mode == USB_DR_MODE_PERIPHERAL)
576576
dwc2_lowlevel_hw_disable(hsotg);
577577

578+
#if IS_ENABLED(CONFIG_USB_DWC2_PERIPHERAL) || \
579+
IS_ENABLED(CONFIG_USB_DWC2_DUAL_ROLE)
580+
/* Postponed adding a new gadget to the udc class driver list */
581+
if (hsotg->gadget_enabled) {
582+
retval = usb_add_gadget_udc(hsotg->dev, &hsotg->gadget);
583+
if (retval) {
584+
dwc2_hsotg_remove(hsotg);
585+
goto error_init;
586+
}
587+
}
588+
#endif /* CONFIG_USB_DWC2_PERIPHERAL || CONFIG_USB_DWC2_DUAL_ROLE */
578589
return 0;
579590

580591
error_init:

drivers/usb/dwc3/dwc3-exynos.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -162,12 +162,6 @@ static const struct dwc3_exynos_driverdata exynos5250_drvdata = {
162162
.suspend_clk_idx = -1,
163163
};
164164

165-
static const struct dwc3_exynos_driverdata exynos5420_drvdata = {
166-
.clk_names = { "usbdrd30", "usbdrd30_susp_clk"},
167-
.num_clks = 2,
168-
.suspend_clk_idx = 1,
169-
};
170-
171165
static const struct dwc3_exynos_driverdata exynos5433_drvdata = {
172166
.clk_names = { "aclk", "susp_clk", "pipe_pclk", "phyclk" },
173167
.num_clks = 4,
@@ -184,9 +178,6 @@ static const struct of_device_id exynos_dwc3_match[] = {
184178
{
185179
.compatible = "samsung,exynos5250-dwusb3",
186180
.data = &exynos5250_drvdata,
187-
}, {
188-
.compatible = "samsung,exynos5420-dwusb3",
189-
.data = &exynos5420_drvdata,
190181
}, {
191182
.compatible = "samsung,exynos5433-dwusb3",
192183
.data = &exynos5433_drvdata,

drivers/usb/dwc3/dwc3-pci.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,10 @@ static void dwc3_pci_resume_work(struct work_struct *work)
206206
int ret;
207207

208208
ret = pm_runtime_get_sync(&dwc3->dev);
209-
if (ret)
209+
if (ret) {
210+
pm_runtime_put_sync_autosuspend(&dwc3->dev);
210211
return;
212+
}
211213

212214
pm_runtime_mark_last_busy(&dwc3->dev);
213215
pm_runtime_put_sync_autosuspend(&dwc3->dev);

drivers/usb/gadget/udc/mv_udc_core.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2313,7 +2313,8 @@ static int mv_udc_probe(struct platform_device *pdev)
23132313
return 0;
23142314

23152315
err_create_workqueue:
2316-
destroy_workqueue(udc->qwork);
2316+
if (udc->qwork)
2317+
destroy_workqueue(udc->qwork);
23172318
err_destroy_dma:
23182319
dma_pool_destroy(udc->dtd_pool);
23192320
err_free_dma:

0 commit comments

Comments
 (0)