Re: [PATCH v4] usb: dwc3: Wait for control tranfer completed when stopping gadget

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

 



Hi,

On 17 October 2016 at 19:53, Felipe Balbi <balbi@xxxxxxxxxx> wrote:
>
> Hi,
>
> Baolin Wang <baolin.wang@xxxxxxxxxx> writes:
>>> Baolin Wang <baolin.wang@xxxxxxxxxx> 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@xxxxxxxxxx>
>>>
>>> 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?

OK, I agree with you and I think a wmb() is not useful here.

-- 
Baolin.wang
Best Regards
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux