[PATCH] usb: dwc3: gadget: Clear wait flag on dequeue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If a transfer is dequeued, then the endpoint is freed to start a new
transfer. Make sure to clear the endpoint's transfer wait flag if
dequeued.

Cc: stable@xxxxxxxxxxxxxxx
Fixes: e0d19563eb6c ("usb: dwc3: gadget: Wait for transfer completion")
Signed-off-by: Thinh Nguyen <Thinh.Nguyen@xxxxxxxxxxxx>
---
 drivers/usb/dwc3/gadget.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 78cb4db8a6e4..9eaeb3c5d06c 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -1771,6 +1771,7 @@ static int dwc3_gadget_ep_dequeue(struct usb_ep *ep,
 		request, ep->name);
 	ret = -EINVAL;
 out:
+	dep->flags &= ~DWC3_EP_WAIT_TRANSFER_COMPLETE;
 	spin_unlock_irqrestore(&dwc->lock, flags);
 
 	return ret;

base-commit: 5c8fe583cce542aa0b84adc939ce85293de36e5e
-- 
2.28.0




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux