mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 10:11:52 -04:00
Merge tag 'fixes-for-v5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus
Felipe writes: usb: fixes for v5.0-rc2 Few minor bug fixes on dwc3: adding a missing synchronize_irq() to prevent a very rare spurious interrupt during suspend; clearing needs_extra_trb flag to prevent it from being left erroneously set and confusing the driver when the request is recycled; initializing link_to a sensible default during init. Apart from these, one minor fix on dwc2 and another on f_sourcesink.c * tag 'fixes-for-v5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb: usb: dwc2: gadget: Fix Remote Wakeup interrupt bit clearing usb: gadget: Potential NULL dereference on allocation error usb: dwc3: gadget: Fix the uninitialized link_state when udc starts usb: dwc3: gadget: Clear req->needs_extra_trb flag on cleanup usb: dwc3: gadget: synchronize_irq dwc irq in suspend
This commit is contained in:
@@ -261,7 +261,7 @@ static void dwc2_gadget_wkup_alert_handler(struct dwc2_hsotg *hsotg)
|
||||
|
||||
if (gintsts2 & GINTSTS2_WKUP_ALERT_INT) {
|
||||
dev_dbg(hsotg->dev, "%s: Wkup_Alert_Int\n", __func__);
|
||||
dwc2_clear_bit(hsotg, GINTSTS2, GINTSTS2_WKUP_ALERT_INT);
|
||||
dwc2_set_bit(hsotg, GINTSTS2, GINTSTS2_WKUP_ALERT_INT);
|
||||
dwc2_set_bit(hsotg, DCTL, DCTL_RMTWKUPSIG);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -177,6 +177,7 @@ static void dwc3_gadget_del_and_unmap_request(struct dwc3_ep *dep,
|
||||
req->started = false;
|
||||
list_del(&req->list);
|
||||
req->remaining = 0;
|
||||
req->needs_extra_trb = false;
|
||||
|
||||
if (req->request.status == -EINPROGRESS)
|
||||
req->request.status = status;
|
||||
@@ -1984,6 +1985,7 @@ static int __dwc3_gadget_start(struct dwc3 *dwc)
|
||||
|
||||
/* begin to receive SETUP packets */
|
||||
dwc->ep0state = EP0_SETUP_PHASE;
|
||||
dwc->link_state = DWC3_LINK_STATE_SS_DIS;
|
||||
dwc3_ep0_out_start(dwc);
|
||||
|
||||
dwc3_gadget_enable_irq(dwc);
|
||||
@@ -3379,6 +3381,8 @@ int dwc3_gadget_suspend(struct dwc3 *dwc)
|
||||
dwc3_disconnect_gadget(dwc);
|
||||
__dwc3_gadget_stop(dwc);
|
||||
|
||||
synchronize_irq(dwc->irq_gadget);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -838,7 +838,7 @@ static struct usb_function *source_sink_alloc_func(
|
||||
|
||||
ss = kzalloc(sizeof(*ss), GFP_KERNEL);
|
||||
if (!ss)
|
||||
return NULL;
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
ss_opts = container_of(fi, struct f_ss_opts, func_inst);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user