Skip to content

Commit 2cbd838

Browse files
committed
Merge tag 'usb-v5.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-linus
Peter writes: Some small bug fixes for both chipidea and cdns USB * tag 'usb-v5.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb: usb: chipidea: udc: assign interrupt number to USB gadget structure usb: cdnsp: Fix lack of removing request from pending list. usb: cdns3: Fix runtime PM imbalance on error
2 parents 746e4ac + 9e3927f commit 2cbd838

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

drivers/usb/cdns3/cdns3-gadget.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3268,8 +3268,10 @@ static int __cdns3_gadget_init(struct cdns *cdns)
32683268
pm_runtime_get_sync(cdns->dev);
32693269

32703270
ret = cdns3_gadget_start(cdns);
3271-
if (ret)
3271+
if (ret) {
3272+
pm_runtime_put_sync(cdns->dev);
32723273
return ret;
3274+
}
32733275

32743276
/*
32753277
* Because interrupt line can be shared with other components in

drivers/usb/cdns3/cdnsp-gadget.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -422,17 +422,17 @@ int cdnsp_ep_enqueue(struct cdnsp_ep *pep, struct cdnsp_request *preq)
422422
int cdnsp_ep_dequeue(struct cdnsp_ep *pep, struct cdnsp_request *preq)
423423
{
424424
struct cdnsp_device *pdev = pep->pdev;
425-
int ret;
425+
int ret_stop = 0;
426+
int ret_rem;
426427

427428
trace_cdnsp_request_dequeue(preq);
428429

429-
if (GET_EP_CTX_STATE(pep->out_ctx) == EP_STATE_RUNNING) {
430-
ret = cdnsp_cmd_stop_ep(pdev, pep);
431-
if (ret)
432-
return ret;
433-
}
430+
if (GET_EP_CTX_STATE(pep->out_ctx) == EP_STATE_RUNNING)
431+
ret_stop = cdnsp_cmd_stop_ep(pdev, pep);
432+
433+
ret_rem = cdnsp_remove_request(pdev, preq, pep);
434434

435-
return cdnsp_remove_request(pdev, preq, pep);
435+
return ret_rem ? ret_rem : ret_stop;
436436
}
437437

438438
static void cdnsp_zero_in_ctx(struct cdnsp_device *pdev)

drivers/usb/chipidea/udc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2061,6 +2061,7 @@ static int udc_start(struct ci_hdrc *ci)
20612061
ci->gadget.name = ci->platdata->name;
20622062
ci->gadget.otg_caps = otg_caps;
20632063
ci->gadget.sg_supported = 1;
2064+
ci->gadget.irq = ci->irq;
20642065

20652066
if (ci->platdata->flags & CI_HDRC_REQUIRES_ALIGNED_DMA)
20662067
ci->gadget.quirk_avoids_skb_reserve = 1;

0 commit comments

Comments
 (0)