So I'm testing my virtual hub drivers. One problem I have is EP allocation. As I mentioned earlier, I have a shared pool of endpoints shared between multiple UDCs. I've added code to "allocate" those EPs from my own udc->match_ep callback. That works ok so far. When binding legacy mass storage, I see it doing the EP autoconfig and grabbing those. However, I've also added a hook to usb_ep_autoconfig_release() to "recover" my EPs, and send them back to the pool. Finally, I've also modified usb_ep_autoconfig_reset() to call the above rather than manually clear the same fields that usb_ep_autoconfig_release() clears. Now, what I observe is that when the mass storage gets bound to the UDC driver: - First the endpoints are properly allocated by my match callback, ie, epautoconf is called to allocate EPs to the function. - But right away, composite.c calls usb_ep_autoconfig_release() effectively releasing those 2 endpoints. And they are never re-claimed again from there. IE. the driver keeps a reference to those unclaimed endpoints and tries to enable & use them. The code that does that is in composite.c:usb_add_config /* set_alt(), or next bind(), sets up ep->claimed as needed */ usb_ep_autoconfig_reset(cdev->gadget); Except I observe that nothing calls epautoconf again, which afaik is the only thing supposed to "claim" the EPs, or am I missing something here ? f->set_alt() in f_mass_storage() will enable/disable the EPs but certainly won't re-claim them. Only bind() will do that but we aren't getting a new bind() call. So what am I missing ? I also notice that nothing else seems to be calling either release or reset on the EPs... from my understanding that should be done either by the function ->unbind (since that's where they are requested in the first place) or by the callers of that... Cheers, Ben. -- 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