Lines Matching refs:vr
290 const struct vring *vr = virtqueue_get_vring(vring->vq); in mlxbf_tmfifo_get_next_desc() local
294 if (vring->next_avail == virtio16_to_cpu(vdev, vr->avail->idx)) in mlxbf_tmfifo_get_next_desc()
300 idx = vring->next_avail % vr->num; in mlxbf_tmfifo_get_next_desc()
301 head = virtio16_to_cpu(vdev, vr->avail->ring[idx]); in mlxbf_tmfifo_get_next_desc()
302 if (WARN_ON(head >= vr->num)) in mlxbf_tmfifo_get_next_desc()
307 return &vr->desc[head]; in mlxbf_tmfifo_get_next_desc()
314 const struct vring *vr = virtqueue_get_vring(vring->vq); in mlxbf_tmfifo_release_desc() local
318 vr_idx = virtio16_to_cpu(vdev, vr->used->idx); in mlxbf_tmfifo_release_desc()
319 idx = vr_idx % vr->num; in mlxbf_tmfifo_release_desc()
320 vr->used->ring[idx].id = cpu_to_virtio32(vdev, desc - vr->desc); in mlxbf_tmfifo_release_desc()
321 vr->used->ring[idx].len = cpu_to_virtio32(vdev, len); in mlxbf_tmfifo_release_desc()
329 vr->used->idx = cpu_to_virtio16(vdev, vr_idx + 1); in mlxbf_tmfifo_release_desc()
336 const struct vring *vr = virtqueue_get_vring(vring->vq); in mlxbf_tmfifo_get_pkt_len() local
345 desc = &vr->desc[idx]; in mlxbf_tmfifo_get_pkt_len()
418 const struct vring *vr = virtqueue_get_vring(vring->vq); in mlxbf_tmfifo_console_output_one() local
442 desc = &vr->desc[idx]; in mlxbf_tmfifo_console_output_one()
680 const struct vring *vr = virtqueue_get_vring(vring->vq); in mlxbf_tmfifo_rxtx_one_desc() local
730 desc = &vr->desc[idx]; in mlxbf_tmfifo_rxtx_one_desc()