dma_mmap_coherent / dma_mmap_attrs error -6

Hi,

I’m using TX2 on l4t r32.2.

A kernel module gets an error -6 when trying to map memory

dma_addr_t	dmaadrs;
ulong	size;
void	*virtadrs;
int 	r;

printk("mmap 1\n");
virtadrs = wrapped_pxdrv_mmapdope1(vma->vm_file, vma->vm_pgoff<<PAGE_SHIFT, &dmaadrs, &size);
if (virtadrs == NULL)
    return(-EIO);

printk("mmap 2\n");
if (vma->vm_end-vma->vm_start > size)
    return(-EIO);

printk("mmap 3\n");

// this is really dma_mmap_attrs(...)
r = dma_mmap_coherent(&wrapped_pxdrv_mmapdope2()->dev, vma, virtadrs, dmaadrs, vma->vm_end-vma->vm_start);
printk("mmap done = %d\n", r);
return(r);

What does this error mean? Same code used to work on l4t r28.2

Thanks