search for: virtio_dma_op

Displaying 2 results from an estimated 2 matches for "virtio_dma_op".

Did you mean: virtio_dma_ops
2020 Apr 28
0
[PATCH 5/5] virtio: Add bounce DMA ops
...dev_addr + bounce_buf_paddr; > + > + _swiotlb_tbl_unmap_single(virtio_pool, dev, addr, size, > + size, dir, attrs); > +} > + > +size_t virtio_max_mapping_size(struct device *dev) > +{ > + return VIRTIO_MAX_BOUNCE_SIZE; > +} > + > +static const struct dma_map_ops virtio_dma_ops = { > + .alloc = virtio_alloc_coherent, > + .free = virtio_free_coherent, > + .map_page = virtio_map_page, > + .unmap_page = virtio_unmap_page, > + .max_mapping_size = virtio_max_mapping_size, > +}; > + > +void virtio_bounce_set_dma_ops(struct virtio_device *vdev) &gt...
2020 Apr 28
1
[PATCH 5/5] virtio: Add bounce DMA ops
...chaning DMA ops, or by doing some automatic change to all drivers. > > > +void virtio_bounce_set_dma_ops(struct virtio_device *vdev) > > > +{ > > > + if (!bounce_buf_paddr) > > > + return; > > > + > > > + set_dma_ops(vdev->dev.parent, &virtio_dma_ops); > > > > > > I don't think DMA API maintainers will be happy with new users > > of set_dma_ops. > > Is there an alternate API that is more preffered? all this is supposed to be part of DMA API itself. new drivers aren't supposed to have custom DMA ops. &...