* Chen Peter-B29397 | 2012-01-29 01:15:52 [+0000]: >> 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. 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