On Wed, May 06, 2020 at 05:56:47PM -0700, gavinli@xxxxxxxxxxxxxx wrote: > From: Gavin Li <gavinli@xxxxxxxxxxxxxx> > > On architectures that are not (or are optionally) DMA coherent, > dma_alloc_coherent() returns an address into the vmalloc space, > and calling virt_to_phys() on this address returns an unusable > physical address. > > This patch replaces the raw remap_pfn_range() call with a call to > dmap_mmap_coherent(), which takes care of the differences between > coherent and non-coherent code paths. > > Tested on an arm64 rk3399 board. > --- > drivers/usb/core/devio.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) I don't think you ran checkpatch.pl on your patch :( Also, please see 2bef9aed6f0e ("usb: usbfs: correct kernel->user page attribute mismatch") in linux-next, does that resolve this problem for you? I think it does the same thing as your patch does... thanks, greg k-h