@@ -479,6 +479,10 @@ static void config_usb_cfg_unlink(
struct usb_function_instance, group);
struct usb_function *f;
+ trace_config_usb_cfg_unlink(config_item_name(&gi->group.cg_item),
+ config_item_name(usb_cfg_ci),
+ config_item_name(usb_func_ci));
+
/*
* ideally I would like to forbid to unlink functions while a gadget is
* bound to an UDC. Since this isn't possible at the moment, we simply
@@ -43,6 +43,23 @@ TRACE_EVENT(config_usb_cfg_link,
__get_str(cfg_name), __get_str(func_name))
);
+TRACE_EVENT(config_usb_cfg_unlink,
+ TP_PROTO(char *name, char *cfg, char *func),
+ TP_ARGS(name, cfg, func),
+ TP_STRUCT__entry(
+ __string(group_name, name)
+ __string(cfg_name, cfg)
+ __string(func_name, func)
+ ),
+ TP_fast_assign(
+ __assign_str(group_name, name);
+ __assign_str(cfg_name, cfg);
+ __assign_str(func_name, func)
+ ),
+ TP_printk("gadget:%s cfg:%s unlink func:%s", __get_str(group_name),
+ __get_str(cfg_name), __get_str(func_name))
+);
+
#endif /* __GADGET_TRACE_H */
/* this part has to be here */
add trace in function config_usb_cfg_unlink() whill show which function was removed from gadget configuraion. Signed-off-by: Linyu Yuan <quic_linyyuan@quicinc.com> --- drivers/usb/gadget/configfs.c | 4 ++++ drivers/usb/gadget/configfs_trace.h | 17 +++++++++++++++++ 2 files changed, 21 insertions(+)