Skip to content

Commit e8784b0

Browse files
committed
Merge tag 'usb-6.11-rc6' 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 6.11-rc6. Included in here are: - dwc3 driver fixes for reported issues - MAINTAINER file update, marking a driver as unsupported :( - cdnsp driver fixes - USB gadget driver fix - USB sysfs fix - other tiny fixes - new device ids for usb serial driver All of these have been in linux-next this week with no reported issues" * tag 'usb-6.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: USB: serial: option: add MeiG Smart SRM825L usb: cdnsp: fix for Link TRB with TC usb: dwc3: st: add missing depopulate in probe error path usb: dwc3: st: fix probed platform device ref count on probe error path usb: dwc3: ep0: Don't reset resource alloc flag (including ep0) usb: core: sysfs: Unmerge @usb3_hardware_lpm_attr_group in remove_power_attributes() usb: typec: fsa4480: Relax CHIP_ID check usb: dwc3: xilinx: add missing depopulate in probe error path usb: dwc3: omap: add missing depopulate in probe error path dt-bindings: usb: microchip,usb2514: Fix reference USB device schema usb: gadget: uvc: queue pump work in uvcg_video_enable() cdc-acm: Add DISABLE_ECHO quirk for GE HealthCare UI Controller usb: cdnsp: fix incorrect index in cdnsp_get_hw_deq function usb: dwc3: core: Prevent USB core invalid event buffer address access MAINTAINERS: Mark UVC gadget driver as orphan
2 parents 770b0ff + 58c2fa5 commit e8784b0

File tree

14 files changed

+78
-18
lines changed

14 files changed

+78
-18
lines changed

Documentation/devicetree/bindings/usb/microchip,usb2514.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ maintainers:
1010
- Fabio Estevam <festevam@gmail.com>
1111

1212
allOf:
13-
- $ref: usb-hcd.yaml#
13+
- $ref: usb-device.yaml#
1414

1515
properties:
1616
compatible:
@@ -36,6 +36,13 @@ required:
3636
- compatible
3737
- reg
3838

39+
patternProperties:
40+
"^.*@[0-9a-f]{1,2}$":
41+
description: The hard wired USB devices
42+
type: object
43+
$ref: /schemas/usb/usb-device.yaml
44+
additionalProperties: true
45+
3946
unevaluatedProperties: false
4047

4148
examples:

MAINTAINERS

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23848,10 +23848,8 @@ F: drivers/media/usb/uvc/
2384823848
F: include/uapi/linux/uvcvideo.h
2384923849

2385023850
USB WEBCAM GADGET
23851-
M: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
23852-
M: Daniel Scally <dan.scally@ideasonboard.com>
2385323851
L: linux-usb@vger.kernel.org
23854-
S: Maintained
23852+
S: Orphan
2385523853
F: drivers/usb/gadget/function/*uvc*
2385623854
F: drivers/usb/gadget/legacy/webcam.c
2385723855
F: include/uapi/linux/usb/g_uvc.h

drivers/usb/cdns3/cdnsp-gadget.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,7 @@ struct cdnsp_stream_info {
811811
* generate Missed Service Error Event.
812812
* Set skip flag when receive a Missed Service Error Event and
813813
* process the missed tds on the endpoint ring.
814+
* @wa1_nop_trb: hold pointer to NOP trb.
814815
*/
815816
struct cdnsp_ep {
816817
struct usb_ep endpoint;
@@ -838,6 +839,8 @@ struct cdnsp_ep {
838839
#define EP_UNCONFIGURED BIT(7)
839840

840841
bool skip;
842+
union cdnsp_trb *wa1_nop_trb;
843+
841844
};
842845

843846
/**

drivers/usb/cdns3/cdnsp-ring.c

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ static u64 cdnsp_get_hw_deq(struct cdnsp_device *pdev,
402402
struct cdnsp_stream_ctx *st_ctx;
403403
struct cdnsp_ep *pep;
404404

405-
pep = &pdev->eps[stream_id];
405+
pep = &pdev->eps[ep_index];
406406

407407
if (pep->ep_state & EP_HAS_STREAMS) {
408408
st_ctx = &pep->stream_info.stream_ctx_array[stream_id];
@@ -1904,6 +1904,23 @@ int cdnsp_queue_bulk_tx(struct cdnsp_device *pdev, struct cdnsp_request *preq)
19041904
if (ret)
19051905
return ret;
19061906

1907+
/*
1908+
* workaround 1: STOP EP command on LINK TRB with TC bit set to 1
1909+
* causes that internal cycle bit can have incorrect state after
1910+
* command complete. In consequence empty transfer ring can be
1911+
* incorrectly detected when EP is resumed.
1912+
* NOP TRB before LINK TRB avoid such scenario. STOP EP command is
1913+
* then on NOP TRB and internal cycle bit is not changed and have
1914+
* correct value.
1915+
*/
1916+
if (pep->wa1_nop_trb) {
1917+
field = le32_to_cpu(pep->wa1_nop_trb->trans_event.flags);
1918+
field ^= TRB_CYCLE;
1919+
1920+
pep->wa1_nop_trb->trans_event.flags = cpu_to_le32(field);
1921+
pep->wa1_nop_trb = NULL;
1922+
}
1923+
19071924
/*
19081925
* Don't give the first TRB to the hardware (by toggling the cycle bit)
19091926
* until we've finished creating all the other TRBs. The ring's cycle
@@ -1999,6 +2016,17 @@ int cdnsp_queue_bulk_tx(struct cdnsp_device *pdev, struct cdnsp_request *preq)
19992016
send_addr = addr;
20002017
}
20012018

2019+
if (cdnsp_trb_is_link(ring->enqueue + 1)) {
2020+
field = TRB_TYPE(TRB_TR_NOOP) | TRB_IOC;
2021+
if (!ring->cycle_state)
2022+
field |= TRB_CYCLE;
2023+
2024+
pep->wa1_nop_trb = ring->enqueue;
2025+
2026+
cdnsp_queue_trb(pdev, ring, 0, 0x0, 0x0,
2027+
TRB_INTR_TARGET(0), field);
2028+
}
2029+
20022030
cdnsp_check_trb_math(preq, enqd_len);
20032031
ret = cdnsp_giveback_first_trb(pdev, pep, preq->request.stream_id,
20042032
start_cycle, start_trb);

drivers/usb/class/cdc-acm.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1761,6 +1761,9 @@ static const struct usb_device_id acm_ids[] = {
17611761
{ USB_DEVICE(0x11ca, 0x0201), /* VeriFone Mx870 Gadget Serial */
17621762
.driver_info = SINGLE_RX_URB,
17631763
},
1764+
{ USB_DEVICE(0x1901, 0x0006), /* GE Healthcare Patient Monitor UI Controller */
1765+
.driver_info = DISABLE_ECHO, /* DISABLE ECHO in termios flag */
1766+
},
17641767
{ USB_DEVICE(0x1965, 0x0018), /* Uniden UBC125XLT */
17651768
.driver_info = NO_UNION_NORMAL, /* has no union descriptor */
17661769
},

drivers/usb/core/sysfs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,7 @@ static int add_power_attributes(struct device *dev)
670670

671671
static void remove_power_attributes(struct device *dev)
672672
{
673+
sysfs_unmerge_group(&dev->kobj, &usb3_hardware_lpm_attr_group);
673674
sysfs_unmerge_group(&dev->kobj, &usb2_hardware_lpm_attr_group);
674675
sysfs_unmerge_group(&dev->kobj, &power_attr_group);
675676
}

drivers/usb/dwc3/core.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,9 +564,17 @@ int dwc3_event_buffers_setup(struct dwc3 *dwc)
564564
void dwc3_event_buffers_cleanup(struct dwc3 *dwc)
565565
{
566566
struct dwc3_event_buffer *evt;
567+
u32 reg;
567568

568569
if (!dwc->ev_buf)
569570
return;
571+
/*
572+
* Exynos platforms may not be able to access event buffer if the
573+
* controller failed to halt on dwc3_core_exit().
574+
*/
575+
reg = dwc3_readl(dwc->regs, DWC3_DSTS);
576+
if (!(reg & DWC3_DSTS_DEVCTRLHLT))
577+
return;
570578

571579
evt = dwc->ev_buf;
572580

drivers/usb/dwc3/dwc3-omap.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,11 +522,13 @@ static int dwc3_omap_probe(struct platform_device *pdev)
522522
if (ret) {
523523
dev_err(dev, "failed to request IRQ #%d --> %d\n",
524524
omap->irq, ret);
525-
goto err1;
525+
goto err2;
526526
}
527527
dwc3_omap_enable_irqs(omap);
528528
return 0;
529529

530+
err2:
531+
of_platform_depopulate(dev);
530532
err1:
531533
pm_runtime_put_sync(dev);
532534
pm_runtime_disable(dev);

drivers/usb/dwc3/dwc3-st.c

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,8 @@ static int st_dwc3_probe(struct platform_device *pdev)
219219
dwc3_data->regmap = regmap;
220220

221221
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "syscfg-reg");
222-
if (!res) {
223-
ret = -ENXIO;
224-
goto undo_platform_dev_alloc;
225-
}
222+
if (!res)
223+
return -ENXIO;
226224

227225
dwc3_data->syscfg_reg_off = res->start;
228226

@@ -233,8 +231,7 @@ static int st_dwc3_probe(struct platform_device *pdev)
233231
devm_reset_control_get_exclusive(dev, "powerdown");
234232
if (IS_ERR(dwc3_data->rstc_pwrdn)) {
235233
dev_err(&pdev->dev, "could not get power controller\n");
236-
ret = PTR_ERR(dwc3_data->rstc_pwrdn);
237-
goto undo_platform_dev_alloc;
234+
return PTR_ERR(dwc3_data->rstc_pwrdn);
238235
}
239236

240237
/* Manage PowerDown */
@@ -269,7 +266,7 @@ static int st_dwc3_probe(struct platform_device *pdev)
269266
if (!child_pdev) {
270267
dev_err(dev, "failed to find dwc3 core device\n");
271268
ret = -ENODEV;
272-
goto err_node_put;
269+
goto depopulate;
273270
}
274271

275272
dwc3_data->dr_mode = usb_get_dr_mode(&child_pdev->dev);
@@ -285,6 +282,7 @@ static int st_dwc3_probe(struct platform_device *pdev)
285282
ret = st_dwc3_drd_init(dwc3_data);
286283
if (ret) {
287284
dev_err(dev, "drd initialisation failed\n");
285+
of_platform_depopulate(dev);
288286
goto undo_softreset;
289287
}
290288

@@ -294,14 +292,14 @@ static int st_dwc3_probe(struct platform_device *pdev)
294292
platform_set_drvdata(pdev, dwc3_data);
295293
return 0;
296294

295+
depopulate:
296+
of_platform_depopulate(dev);
297297
err_node_put:
298298
of_node_put(child);
299299
undo_softreset:
300300
reset_control_assert(dwc3_data->rstc_rst);
301301
undo_powerdown:
302302
reset_control_assert(dwc3_data->rstc_pwrdn);
303-
undo_platform_dev_alloc:
304-
platform_device_put(pdev);
305303
return ret;
306304
}
307305

drivers/usb/dwc3/dwc3-xilinx.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,9 +327,14 @@ static int dwc3_xlnx_probe(struct platform_device *pdev)
327327
goto err_pm_set_suspended;
328328

329329
pm_suspend_ignore_children(dev, false);
330-
return pm_runtime_resume_and_get(dev);
330+
ret = pm_runtime_resume_and_get(dev);
331+
if (ret < 0)
332+
goto err_pm_set_suspended;
333+
334+
return 0;
331335

332336
err_pm_set_suspended:
337+
of_platform_depopulate(dev);
333338
pm_runtime_set_suspended(dev);
334339

335340
err_clk_put:

0 commit comments

Comments
 (0)