diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-04-14 15:55:33 +0200 |
---|---|---|
committer | Christian Mauderer <christian.mauderer@embedded-brains.de> | 2020-04-14 16:39:20 +0200 |
commit | 64c45b5a1ae864f069eee98ee5be49629294025d (patch) | |
tree | b14ca7dc67c07328d68870744621615147375007 /freebsd | |
parent | testsuite: A description for each test added (diff) | |
download | rtems-libbsd-64c45b5a1ae864f069eee98ee5be49629294025d.tar.bz2 |
usb_busdma: Add USB_NEED_BUSDMA_COHERENT_ALLOC
Some BSPs have a cache-coherent memory area, however, it should not be
used for the USB controller.
Diffstat (limited to 'freebsd')
-rw-r--r-- | freebsd/sys/dev/usb/usb_busdma.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/freebsd/sys/dev/usb/usb_busdma.c b/freebsd/sys/dev/usb/usb_busdma.c index 9a70c687..dc52fe15 100644 --- a/freebsd/sys/dev/usb/usb_busdma.c +++ b/freebsd/sys/dev/usb/usb_busdma.c @@ -584,7 +584,11 @@ usb_pc_alloc_mem(struct usb_page_cache *pc, struct usb_page *pg, } /* allocate memory */ if (bus_dmamem_alloc( +#if !defined(__rtems__) || USB_NEED_BUSDMA_COHERENT_ALLOC utag->tag, &ptr, (BUS_DMA_WAITOK | BUS_DMA_COHERENT), &map)) { +#else /* __rtems__ */ + utag->tag, &ptr, BUS_DMA_WAITOK, &map)) { +#endif /* __rtems__ */ goto error; } /* setup page cache */ |