On 02/04/2020 17:00, Sebastian Huber wrote: > On 02/04/2020 16:42, Christian Mauderer wrote: > >> diff --git a/freebsd/sys/dev/usb/usb_busdma.c >> b/freebsd/sys/dev/usb/usb_busdma.c >> index 9a70c687..c8000170 100644 >> --- a/freebsd/sys/dev/usb/usb_busdma.c >> +++ b/freebsd/sys/dev/usb/usb_busdma.c >> @@ -78,6 +78,52 @@ static void usb_pc_common_mem_cb(void *, >> bus_dma_segment_t *, int, int, >> uint8_t); >> #endif >> +#ifdef __rtems__ >> +#include <bsp.h> >> +#if defined(LIBBSP_ARM_IMX_BSP_H) >> +#define NEED_MISSALIGNED_COPY >> +#endif > > Could you please move changes in general file imported from FreeBSD to > separate commits.
OK. I'll split them. > > I don't like this change here at all. I had a similar issue with > misaligned memcpy() to device memory here on the STM32H7 platform. Could > you first try this patch here: Works fine too. The patch seems generic. Do you plan to add it soon as an extra patch? > > diff --git a/freebsd/sys/dev/usb/usb_busdma.c > b/freebsd/sys/dev/usb/usb_busdma.c > index 9a70c687..973a3409 100644 > --- a/freebsd/sys/dev/usb/usb_busdma.c > +++ b/freebsd/sys/dev/usb/usb_busdma.c > @@ -584,7 +584,7 @@ usb_pc_alloc_mem(struct usb_page_cache *pc, struct > usb_page *pg, > } > /* allocate memory */ > if (bus_dmamem_alloc( > - utag->tag, &ptr, (BUS_DMA_WAITOK | BUS_DMA_COHERENT), &map)) { > + utag->tag, &ptr, BUS_DMA_WAITOK, &map)) { > goto error; > } > /* setup page cache */ > -- -------------------------------------------- embedded brains GmbH Herr Christian Mauderer Dornierstr. 4 D-82178 Puchheim Germany email: christian.maude...@embedded-brains.de Phone: +49-89-18 94 741 - 18 Fax: +49-89-18 94 741 - 08 PGP: Public key available on request. Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. _______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel