Displaying 3 results from an estimated 3 matches for "dma_bit_bask".
2014 Aug 27
2
[PATCH 3/3] virtio_pci: Use the DMA API for virtqueues
On Tue, Aug 26, 2014 at 02:17:02PM -0700, Andy Lutomirski wrote:
> A virtqueue is a coherent DMA mapping. Use the DMA API for it.
> This fixes virtio_pci on Xen.
>
> Signed-off-by: Andy Lutomirski <luto at amacapital.net>
> ---
> drivers/virtio/virtio_pci.c | 25 ++++++++++++++++++-------
> 1 file changed, 18 insertions(+), 7 deletions(-)
>
> diff --git
2014 Aug 27
2
[PATCH 3/3] virtio_pci: Use the DMA API for virtqueues
On Tue, Aug 26, 2014 at 02:17:02PM -0700, Andy Lutomirski wrote:
> A virtqueue is a coherent DMA mapping. Use the DMA API for it.
> This fixes virtio_pci on Xen.
>
> Signed-off-by: Andy Lutomirski <luto at amacapital.net>
> ---
> drivers/virtio/virtio_pci.c | 25 ++++++++++++++++++-------
> 1 file changed, 18 insertions(+), 7 deletions(-)
>
> diff --git
2014 Aug 27
0
[PATCH 3/3] virtio_pci: Use the DMA API for virtqueues
...ret = dma_set_mask_and_coherent(..)
> if (ret)
> ret = dma_set_mask_and_coherent(.., DMA_BIT_MASK(32))
>
> if (ret)
> pr_warn("We are truly screwed. Good luck!\n");
>
I assumed that, if dma_set_mask_and_coherent(..., DMA_BIT_BASK(64))
fails, then we can still do DMA, just not 64-bit DMA. This driver
should be fine with that -- it'll just be a bit slower.
If that's not a safe assumption, I can change it.
--Andy