NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/50038: udl (DisplayLink GX-DVI_U2B) alignment fault on earmv6hf NETWALKER
On 11/16/16 13:32, MOCHIDA Shuji wrote:
In these functions, (curcpu()->ci_ctrl & CPU_CONTROL_AFLT_ENABLE) is zero.
We should be running with SCTLR.A =0 and SCTLR.U = 1, i.e.
CPU_CONTROL_AFLT_ENABLE unset and CPU_CONTROL_UNAL_ENABLE set, but
I think the usb transfer buffer is being marked as device/strongly ordered memory and
we get an unaligned access fault because of this.
be32enc(sc->sc_cmd_buf, val) -- sc_cmd_buf is allocated in
usbdi.c:414 usbd_alloc_buffer() using kmem_alloc()..
nearly... usbd_alloc_buller() using usb_allocmem_flags()
https://nxr.netbsd.org/xref/src/sys/dev/usb/usbdi.c#403
You could try removing BUS_DMA_COHERENT from the bus_dmamem_map call -
see diff.
-mochid
Nick
Index: sys/dev/usb/usb_mem.c
===================================================================
RCS file: /cvsroot/src/sys/dev/usb/usb_mem.c,v
retrieving revision 1.68
diff -u -p -r1.68 usb_mem.c
--- sys/dev/usb/usb_mem.c 30 Apr 2016 14:31:39 -0000 1.68
+++ sys/dev/usb/usb_mem.c 16 Nov 2016 14:24:50 -0000
@@ -168,7 +168,7 @@ usb_block_allocmem(bus_dma_tag_t tag, si
goto free0;
error = bus_dmamem_map(tag, b->segs, b->nsegs, b->size,
- &b->kaddr, BUS_DMA_WAITOK|BUS_DMA_COHERENT);
+ &b->kaddr, BUS_DMA_WAITOK);
if (error)
goto free1;
Home |
Main Index |
Thread Index |
Old Index