usb/gadget: Add an EP dispose() callback for EP lifetime tracking
PATCH v3 2/3 usb/gadget: Add an EP dispose() callback for EP lifetime tracking
Quoted 16 lines · Greg KH
Quoted 15 lines · Benjamin Herrenschmidt
Some UDC may want to allocate endpoints dynamically, either because the HW supports an arbitrary large number or because (like the Aspeed BMC SoCs), the pool of HW endpoints is shared between multiple gadgets.
The allocation side can be done rather easily using the existing
match_ep()UDC hook.However we have no good place to "free" them.
This implements a "simple" variant of this, which calls an EP dispose callback on all EPs associated with a gadget when the composite device gets unbound.
This is required by my upcoming Aspeed vHub driver.
Quoted 8 lines
Quoted 5 lines
Signed-off-by Benjamin Herrenschmidt <[email protected]>--- drivers/usb/gadget/composite.c | 8 ++++++++ include/linux/usb/gadget.h | 1 + 2 files changed, 9 insertions(+)Any reason you aren't sending these to the maintainer of the usb gadget subsystem? get_maintainer.pl is your friend :)
Ooops, forgot to CC Felipe, I suppose I assumed he follows the list.
I'll resend them. He saw earlier versions, he proposed a different approach to solve the lifetime tracking that I very strongly disagreed with, but he didn't reply to that last email back in the day..
Cheers,
Ben.
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html