RE: [RFC/PATCH] gadget/composite: push set interface & set config into process context

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

 




> >> This series pushes the processing of SET INTERFACE and SET CONFIG for
> all
> >> composite gadgets into process context via a workqueue. This makes it
> >> possible to call ->ep_disable() in process context. The UDC in turn
> may
> >> sleep/wait until it canceled all outstanding requests and may then
> >> continue.
> >So, after putting ->disconnect stuff to workqueue, what's your
> suggestion
> >to sync udc with gadget driver? When the vbus is off (disconnection),
> usually,
> >the udc will put the controller to low power mode to save power, if the
> udc
> >put the controller to low power mode and close the related code, the
> defer
> >->disconnect will hang the system.
> 
> You can use a synchronous workqueue for setup and disconnect. This makes
> sure the setup request and disconnect are executed in the same order as
> it was seen by the UDC. So you enqueue the setup packet followed by the
> disconnect. First you process the setup packet after that notify the
> disconnect and put your udc into suspend.
> 
How udc knows the disconnect has finished?  suspend need to be called by udc.



> Sebastian


--
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