Lines Matching refs:wq

71 static inline unsigned int svnic_wq_desc_avail(struct vnic_wq *wq)  in svnic_wq_desc_avail()  argument
74 return wq->ring.desc_avail; in svnic_wq_desc_avail()
77 static inline unsigned int svnic_wq_desc_used(struct vnic_wq *wq) in svnic_wq_desc_used() argument
80 return wq->ring.desc_count - wq->ring.desc_avail - 1; in svnic_wq_desc_used()
83 static inline void *svnic_wq_next_desc(struct vnic_wq *wq) in svnic_wq_next_desc() argument
85 return wq->to_use->desc; in svnic_wq_next_desc()
88 static inline void svnic_wq_post(struct vnic_wq *wq, in svnic_wq_post() argument
92 struct vnic_wq_buf *buf = wq->to_use; in svnic_wq_post()
107 iowrite32(buf->index, &wq->ctrl->posted_index); in svnic_wq_post()
109 wq->to_use = buf; in svnic_wq_post()
111 wq->ring.desc_avail--; in svnic_wq_post()
114 static inline void svnic_wq_service(struct vnic_wq *wq, in svnic_wq_service() argument
116 void (*buf_service)(struct vnic_wq *wq, in svnic_wq_service() argument
122 buf = wq->to_clean; in svnic_wq_service()
125 (*buf_service)(wq, cq_desc, buf, opaque); in svnic_wq_service()
127 wq->ring.desc_avail++; in svnic_wq_service()
129 wq->to_clean = buf->next; in svnic_wq_service()
134 buf = wq->to_clean; in svnic_wq_service()
138 void svnic_wq_free(struct vnic_wq *wq);
139 int svnic_wq_alloc(struct vnic_dev *vdev, struct vnic_wq *wq,
141 int vnic_wq_devcmd2_alloc(struct vnic_dev *vdev, struct vnic_wq *wq,
143 void vnic_wq_init_start(struct vnic_wq *wq, unsigned int cq_index,
148 void svnic_wq_init(struct vnic_wq *wq, unsigned int cq_index,
151 unsigned int svnic_wq_error_status(struct vnic_wq *wq);
152 void svnic_wq_enable(struct vnic_wq *wq);
153 int svnic_wq_disable(struct vnic_wq *wq);
154 void svnic_wq_clean(struct vnic_wq *wq,
155 void (*buf_clean)(struct vnic_wq *wq, struct vnic_wq_buf *buf));