Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c4f62dcc authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: dwc3: gadget: handle ep_dequeue in LPM properly"

parents 970def32 5a97f312
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -1805,11 +1805,6 @@ static int dwc3_gadget_ep_dequeue(struct usb_ep *ep,
	unsigned long			flags;
	int				ret = 0;

	if (atomic_read(&dwc->in_lpm)) {
		dev_err(dwc->dev, "Unable to dequeue while in LPM\n");
		return -EAGAIN;
	}

	trace_dwc3_ep_dequeue(req);
	dbg_ep_dequeue(dep->number, req);

@@ -3537,6 +3532,11 @@ int dwc3_stop_active_transfer(struct dwc3_ep *dep, bool force, bool interrupt)
	u32 cmd;
	int ret;

	if (atomic_read(&dwc->in_lpm)) {
		dev_err(dwc->dev, "cannot stop transfers while in LPM\n");
		return -EINVAL;
	}

	if (!(dep->flags & DWC3_EP_TRANSFER_STARTED) ||
	    (dep->flags & DWC3_EP_END_TRANSFER_PENDING))
		return 0;