Lines Matching refs:vring_packed

1843 static void vring_free_packed(struct vring_virtqueue_packed *vring_packed,  in vring_free_packed()  argument
1846 if (vring_packed->vring.desc) in vring_free_packed()
1847 vring_free_queue(vdev, vring_packed->ring_size_in_bytes, in vring_free_packed()
1848 vring_packed->vring.desc, in vring_free_packed()
1849 vring_packed->ring_dma_addr); in vring_free_packed()
1851 if (vring_packed->vring.driver) in vring_free_packed()
1852 vring_free_queue(vdev, vring_packed->event_size_in_bytes, in vring_free_packed()
1853 vring_packed->vring.driver, in vring_free_packed()
1854 vring_packed->driver_event_dma_addr); in vring_free_packed()
1856 if (vring_packed->vring.device) in vring_free_packed()
1857 vring_free_queue(vdev, vring_packed->event_size_in_bytes, in vring_free_packed()
1858 vring_packed->vring.device, in vring_free_packed()
1859 vring_packed->device_event_dma_addr); in vring_free_packed()
1861 kfree(vring_packed->desc_state); in vring_free_packed()
1862 kfree(vring_packed->desc_extra); in vring_free_packed()
1865 static int vring_alloc_queue_packed(struct vring_virtqueue_packed *vring_packed, in vring_alloc_queue_packed() argument
1882 vring_packed->vring.desc = ring; in vring_alloc_queue_packed()
1883 vring_packed->ring_dma_addr = ring_dma_addr; in vring_alloc_queue_packed()
1884 vring_packed->ring_size_in_bytes = ring_size_in_bytes; in vring_alloc_queue_packed()
1894 vring_packed->vring.driver = driver; in vring_alloc_queue_packed()
1895 vring_packed->event_size_in_bytes = event_size_in_bytes; in vring_alloc_queue_packed()
1896 vring_packed->driver_event_dma_addr = driver_event_dma_addr; in vring_alloc_queue_packed()
1904 vring_packed->vring.device = device; in vring_alloc_queue_packed()
1905 vring_packed->device_event_dma_addr = device_event_dma_addr; in vring_alloc_queue_packed()
1907 vring_packed->vring.num = num; in vring_alloc_queue_packed()
1912 vring_free_packed(vring_packed, vdev); in vring_alloc_queue_packed()
1916 static int vring_alloc_state_extra_packed(struct vring_virtqueue_packed *vring_packed) in vring_alloc_state_extra_packed() argument
1920 u32 num = vring_packed->vring.num; in vring_alloc_state_extra_packed()
1932 vring_packed->desc_state = state; in vring_alloc_state_extra_packed()
1933 vring_packed->desc_extra = extra; in vring_alloc_state_extra_packed()
1943 static void virtqueue_vring_init_packed(struct vring_virtqueue_packed *vring_packed, in virtqueue_vring_init_packed() argument
1946 vring_packed->next_avail_idx = 0; in virtqueue_vring_init_packed()
1947 vring_packed->avail_wrap_counter = 1; in virtqueue_vring_init_packed()
1948 vring_packed->event_flags_shadow = 0; in virtqueue_vring_init_packed()
1949 vring_packed->avail_used_flags = 1 << VRING_PACKED_DESC_F_AVAIL; in virtqueue_vring_init_packed()
1953 vring_packed->event_flags_shadow = VRING_PACKED_EVENT_FLAG_DISABLE; in virtqueue_vring_init_packed()
1954 vring_packed->vring.driver->flags = in virtqueue_vring_init_packed()
1955 cpu_to_le16(vring_packed->event_flags_shadow); in virtqueue_vring_init_packed()
1960 struct vring_virtqueue_packed *vring_packed) in virtqueue_vring_attach_packed() argument
1962 vq->packed = *vring_packed; in virtqueue_vring_attach_packed()
1992 struct vring_virtqueue_packed vring_packed = {}; in vring_create_virtqueue_packed() local
1996 if (vring_alloc_queue_packed(&vring_packed, vdev, num)) in vring_create_virtqueue_packed()
2026 err = vring_alloc_state_extra_packed(&vring_packed); in vring_create_virtqueue_packed()
2030 virtqueue_vring_init_packed(&vring_packed, !!callback); in vring_create_virtqueue_packed()
2033 virtqueue_vring_attach_packed(vq, &vring_packed); in vring_create_virtqueue_packed()
2043 vring_free_packed(&vring_packed, vdev); in vring_create_virtqueue_packed()
2050 struct vring_virtqueue_packed vring_packed = {}; in virtqueue_resize_packed() local
2055 if (vring_alloc_queue_packed(&vring_packed, vdev, num)) in virtqueue_resize_packed()
2058 err = vring_alloc_state_extra_packed(&vring_packed); in virtqueue_resize_packed()
2064 virtqueue_vring_init_packed(&vring_packed, !!vq->vq.callback); in virtqueue_resize_packed()
2066 virtqueue_init(vq, vring_packed.vring.num); in virtqueue_resize_packed()
2067 virtqueue_vring_attach_packed(vq, &vring_packed); in virtqueue_resize_packed()
2072 vring_free_packed(&vring_packed, vdev); in virtqueue_resize_packed()