Commit 974a1368 authored by Felipe Balbi's avatar Felipe Balbi

usb: dwc3: gadget: don't use resource_index as a flag

We have a proper flag for testing that we have a valid transfer in
flight, let's use that instead.

This patch is in preparation to fix a rare race condition that happens
upon Disconnect Interrupt.
Tested-by: default avatarThinh Nguyen <thinhn@synopsys.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent acbfa6c2
...@@ -2626,8 +2626,8 @@ static void dwc3_stop_active_transfer(struct dwc3_ep *dep, bool force) ...@@ -2626,8 +2626,8 @@ static void dwc3_stop_active_transfer(struct dwc3_ep *dep, bool force)
u32 cmd; u32 cmd;
int ret; int ret;
if ((dep->flags & DWC3_EP_END_TRANSFER_PENDING) || if ((dep->flags & DWC3_EP_END_TRANSFER_PENDING)
!dep->resource_index) || !(dep->flags & DWC3_EP_TRANSFER_STARTED))
return; return;
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment