Lines Matching refs:ev_file

35 	struct devx_async_cmd_event_file *ev_file;
43 struct list_head list; /* headed in ev_file->event_list */
60 struct list_head file_list; /* headed in ev_file->
67 struct list_head event_list; /* headed in ev_file->event_list or in
76 struct devx_async_event_file *ev_file;
1700 struct devx_async_cmd_event_file *ev_file;
1706 ev_file = container_of(uobj, struct devx_async_cmd_event_file,
1708 devx_init_event_queue(&ev_file->ev_queue);
1709 mlx5_cmd_init_async_ctx(mdev->mdev, &ev_file->async_ctx);
1718 struct devx_async_event_file *ev_file;
1732 ev_file = container_of(uobj, struct devx_async_event_file,
1734 spin_lock_init(&ev_file->lock);
1735 INIT_LIST_HEAD(&ev_file->event_list);
1736 init_waitqueue_head(&ev_file->poll_wait);
1738 ev_file->omit_data = 1;
1739 INIT_LIST_HEAD(&ev_file->subscribed_events_list);
1740 ev_file->dev = dev;
1749 struct devx_async_cmd_event_file *ev_file = async_data->ev_file;
1750 struct devx_async_event_queue *ev_queue = &ev_file->ev_queue;
1782 struct devx_async_cmd_event_file *ev_file;
1808 ev_file = container_of(fd_uobj, struct devx_async_cmd_event_file,
1811 if (atomic_add_return(cmd_out_len, &ev_file->ev_queue.bytes_in_use) >
1813 atomic_sub(cmd_out_len, &ev_file->ev_queue.bytes_in_use);
1831 async_data->ev_file = ev_file;
1834 err = mlx5_cmd_exec_cb(&ev_file->async_ctx, cmd_in,
1849 atomic_sub(cmd_out_len, &ev_file->ev_queue.bytes_in_use);
2009 struct devx_async_event_file *ev_file;
2037 ev_file = container_of(fd_uobj, struct devx_async_event_file,
2105 uverbs_uobject_get(&ev_file->uobj);
2118 event_sub->ev_file = ev_file;
2135 spin_lock_irq(&ev_file->lock);
2137 &ev_file->subscribed_events_list);
2138 spin_unlock_irq(&ev_file->lock);
2172 uverbs_uobject_put(&event_sub->ev_file->uobj);
2451 struct devx_async_event_file *ev_file;
2455 ev_file = event_sub->ev_file;
2457 if (ev_file->omit_data) {
2458 spin_lock_irqsave(&ev_file->lock, flags);
2460 ev_file->is_destroyed) {
2461 spin_unlock_irqrestore(&ev_file->lock, flags);
2465 list_add_tail(&event_sub->event_list, &ev_file->event_list);
2466 spin_unlock_irqrestore(&ev_file->lock, flags);
2467 wake_up_interruptible(&ev_file->poll_wait);
2474 spin_lock_irqsave(&ev_file->lock, flags);
2475 ev_file->is_overflow_err = 1;
2476 spin_unlock_irqrestore(&ev_file->lock, flags);
2483 spin_lock_irqsave(&ev_file->lock, flags);
2484 if (!ev_file->is_destroyed)
2485 list_add_tail(&event_data->list, &ev_file->event_list);
2488 spin_unlock_irqrestore(&ev_file->lock, flags);
2489 wake_up_interruptible(&ev_file->poll_wait);
2682 struct devx_async_event_file *ev_file = filp->private_data;
2690 omit_data = ev_file->omit_data;
2692 spin_lock_irq(&ev_file->lock);
2694 if (ev_file->is_overflow_err) {
2695 ev_file->is_overflow_err = 0;
2696 spin_unlock_irq(&ev_file->lock);
2701 while (list_empty(&ev_file->event_list)) {
2702 spin_unlock_irq(&ev_file->lock);
2707 if (wait_event_interruptible(ev_file->poll_wait,
2708 (!list_empty(&ev_file->event_list) ||
2709 ev_file->is_destroyed))) {
2713 spin_lock_irq(&ev_file->lock);
2714 if (ev_file->is_destroyed) {
2715 spin_unlock_irq(&ev_file->lock);
2721 event_sub = list_first_entry(&ev_file->event_list,
2727 event = list_first_entry(&ev_file->event_list,
2735 spin_unlock_irq(&ev_file->lock);
2744 spin_unlock_irq(&ev_file->lock);
2760 struct devx_async_event_file *ev_file = filp->private_data;
2763 poll_wait(filp, &ev_file->poll_wait, wait);
2765 spin_lock_irq(&ev_file->lock);
2766 if (ev_file->is_destroyed)
2768 else if (!list_empty(&ev_file->event_list))
2770 spin_unlock_irq(&ev_file->lock);
2782 uverbs_uobject_put(&event_sub->ev_file->uobj);
2822 struct devx_async_event_file *ev_file =
2826 struct mlx5_ib_dev *dev = ev_file->dev;
2828 spin_lock_irq(&ev_file->lock);
2829 ev_file->is_destroyed = 1;
2832 if (ev_file->omit_data) {
2835 list_for_each_entry_safe(event_sub, tmp, &ev_file->event_list,
2842 list_for_each_entry_safe(entry, tmp, &ev_file->event_list,
2849 spin_unlock_irq(&ev_file->lock);
2850 wake_up_interruptible(&ev_file->poll_wait);
2855 &ev_file->subscribed_events_list, file_list) {