Lines Matching refs:ev
218 struct tb_hotplug_event *ev = container_of(work, typeof(*ev), work); in tb_handle_hotplug() local
219 struct tb *tb = ev->tb; in tb_handle_hotplug()
226 sw = get_switch_at_route(tb->root_switch, ev->route); in tb_handle_hotplug()
230 ev->route, ev->port, ev->unplug); in tb_handle_hotplug()
233 if (ev->port > sw->config.max_port_number) { in tb_handle_hotplug()
236 ev->route, ev->port, ev->unplug); in tb_handle_hotplug()
239 port = &sw->ports[ev->port]; in tb_handle_hotplug()
243 ev->route, ev->port, ev->unplug); in tb_handle_hotplug()
246 if (ev->unplug) { in tb_handle_hotplug()
276 kfree(ev); in tb_handle_hotplug()
288 struct tb_hotplug_event *ev = kmalloc(sizeof(*ev), GFP_KERNEL); in tb_schedule_hotplug_handler() local
289 if (!ev) in tb_schedule_hotplug_handler()
291 INIT_WORK(&ev->work, tb_handle_hotplug); in tb_schedule_hotplug_handler()
292 ev->tb = tb; in tb_schedule_hotplug_handler()
293 ev->route = route; in tb_schedule_hotplug_handler()
294 ev->port = port; in tb_schedule_hotplug_handler()
295 ev->unplug = unplug; in tb_schedule_hotplug_handler()
296 queue_work(tb->wq, &ev->work); in tb_schedule_hotplug_handler()