lkml.org 
[lkml]   [2016]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v4] usb: dwc3: Wait for control tranfer completed when stopping gadget
Date

Hi,

Baolin Wang <baolin.wang@linaro.org> writes:
>> Baolin Wang <baolin.wang@linaro.org> writes:
>>> When we change the USB function with configfs dynamically, we possibly met this
>>> situation: one core is doing the control transfer, another core is trying to
>>> unregister the USB gadget from userspace, we must wait for completing this
>>> control tranfer, or it will hang the controller to set the DEVCTRLHLT flag.
>>>
>>> Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
>>
>> Can you make sure this still works?
>
> With applying this patch, It can work well on my platform, but I have
> some worries about the risk of accessing 'dwc->ep0state' without lock
> protection in dwc3_gadget_pullup() function.

hmm, I might be missing something, but I think there's no risk here. If
anything, a wmb() is probably enough before reading ep0state. No?

--
balbi
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2016-10-17 13:55    [W:0.038 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site