Lines Matching full:eh
919 struct prestera_fw_event_handler *eh; in __find_event_handler() local
921 list_for_each_entry_rcu(eh, &sw->event_handlers, list) { in __find_event_handler()
922 if (eh->type == type) in __find_event_handler()
923 return eh; in __find_event_handler()
931 struct prestera_fw_event_handler *eh) in prestera_find_event_handler() argument
939 *eh = *tmp; in prestera_find_event_handler()
951 struct prestera_fw_event_handler eh; in prestera_evt_recv() local
962 err = prestera_find_event_handler(sw, msg_type, &eh); in prestera_evt_recv()
972 eh.func(sw, &evt, eh.arg); in prestera_evt_recv()
980 struct prestera_fw_event_handler eh; in prestera_pkt_recv() local
986 err = prestera_find_event_handler(sw, PRESTERA_EVENT_TYPE_RXTX, &eh); in prestera_pkt_recv()
990 eh.func(sw, &ev, eh.arg); in prestera_pkt_recv()
2256 struct prestera_fw_event_handler *eh; in prestera_hw_event_handler_register() local
2258 eh = __find_event_handler(sw, type); in prestera_hw_event_handler_register()
2259 if (eh) in prestera_hw_event_handler_register()
2262 eh = kmalloc(sizeof(*eh), GFP_KERNEL); in prestera_hw_event_handler_register()
2263 if (!eh) in prestera_hw_event_handler_register()
2266 eh->type = type; in prestera_hw_event_handler_register()
2267 eh->func = fn; in prestera_hw_event_handler_register()
2268 eh->arg = arg; in prestera_hw_event_handler_register()
2270 INIT_LIST_HEAD(&eh->list); in prestera_hw_event_handler_register()
2272 list_add_rcu(&eh->list, &sw->event_handlers); in prestera_hw_event_handler_register()
2281 struct prestera_fw_event_handler *eh; in prestera_hw_event_handler_unregister() local
2283 eh = __find_event_handler(sw, type); in prestera_hw_event_handler_unregister()
2284 if (!eh) in prestera_hw_event_handler_unregister()
2287 list_del_rcu(&eh->list); in prestera_hw_event_handler_unregister()
2288 kfree_rcu(eh, rcu); in prestera_hw_event_handler_unregister()