Re: usb_pc_cpu_flush

2015-02-02 Thread Hans Petter Selasky
Hi Ian, Any news on this issue? I've put the following patch into -current for your convenience: https://svnweb.freebsd.org/changeset/base/278074 Kohji: Maybe you also want to test and review this patch? --HPS ___ freebsd-usb@freebsd.org mailing lis

Re: usb_pc_cpu_flush

2015-01-16 Thread Hans Petter Selasky
Hi Ian, Please find attached a patch which disable the double mapping of allocated DMA capable buffers in the USB stack for all drivers. Can you test it and check out the total memory usage before and after the patch? Also verify it if makes any difference on any platforms. Thank you! --HP

Re: usb_pc_cpu_flush

2015-01-14 Thread Hans Petter Selasky
On 01/14/15 16:03, Ian Lepore wrote: If you are allocating the memory using bus_dmamem_alloc() then no, absolutely not. It's working for you by accident because of the USB_HOST_ALIGN hacks which I think date back to freebsd 8 or so. When I talked to you a couple years ago about doing it the rig

Re: usb_pc_cpu_flush

2015-01-14 Thread Ian Lepore
On Wed, 2015-01-14 at 06:13 +0100, Hans Petter Selasky wrote: > On 01/13/15 21:25, Ian Lepore wrote: > > On Tue, 2015-01-13 at 17:52 +0100, Hans Petter Selasky wrote: > >> On 01/13/15 17:29, Ian Lepore wrote: > >>> On Tue, 2015-01-13 at 16:57 +0100, Hans Petter Selasky wrote: [...] > >> > >> Hi, >

Re: usb_pc_cpu_flush

2015-01-13 Thread Hans Petter Selasky
On 01/13/15 21:25, Ian Lepore wrote: On Tue, 2015-01-13 at 17:52 +0100, Hans Petter Selasky wrote: On 01/13/15 17:29, Ian Lepore wrote: On Tue, 2015-01-13 at 16:57 +0100, Hans Petter Selasky wrote: On 01/13/15 16:40, Ian Lepore wrote: On Tue, 2015-01-13 at 16:27 +0100, Hans Petter Selasky wro

Re: usb_pc_cpu_flush

2015-01-13 Thread Ian Lepore
On Tue, 2015-01-13 at 17:52 +0100, Hans Petter Selasky wrote: > On 01/13/15 17:29, Ian Lepore wrote: > > On Tue, 2015-01-13 at 16:57 +0100, Hans Petter Selasky wrote: > >> On 01/13/15 16:40, Ian Lepore wrote: > >>> On Tue, 2015-01-13 at 16:27 +0100, Hans Petter Selasky wrote: > On 01/13/15 15:

Re: usb_pc_cpu_flush

2015-01-13 Thread Hans Petter Selasky
Hi Kott, Can you tell us which ARM kernel configuration file you are using for FreeBSD? Reading through this thread I cannot see this piece of information yet. Have you tested other ARM platforms? Thank you, --HPS ___ freebsd-usb@freebsd.org maili

Re: usb_pc_cpu_flush

2015-01-13 Thread Hans Petter Selasky
On 01/13/15 17:52, Hans Petter Selasky wrote: Hi, Can you give an example of a NIC driver which you consider a good example which use DMA both for data (not only mbufs) and the control path and use busdma as you consider to be correct? --HPS So that I can compare this agains what USB is doin

Re: usb_pc_cpu_flush

2015-01-13 Thread Hans Petter Selasky
On 01/13/15 17:29, Ian Lepore wrote: On Tue, 2015-01-13 at 16:57 +0100, Hans Petter Selasky wrote: On 01/13/15 16:40, Ian Lepore wrote: On Tue, 2015-01-13 at 16:27 +0100, Hans Petter Selasky wrote: On 01/13/15 15:49, Ian Lepore wrote: On Tue, 2015-01-13 at 00:14 -0700, kott wrote: Yes with c

Re: usb_pc_cpu_flush

2015-01-13 Thread Ian Lepore
On Tue, 2015-01-13 at 16:57 +0100, Hans Petter Selasky wrote: > On 01/13/15 16:40, Ian Lepore wrote: > > On Tue, 2015-01-13 at 16:27 +0100, Hans Petter Selasky wrote: > >> On 01/13/15 15:49, Ian Lepore wrote: > >>> On Tue, 2015-01-13 at 00:14 -0700, kott wrote: > Yes with cache disabled, this

Re: usb_pc_cpu_flush

2015-01-13 Thread Hans Petter Selasky
On 01/13/15 16:57, Hans Petter Selasky wrote: BUSDMA does. --HPS ... allow this. --HPS ___ freebsd-usb@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.

Re: usb_pc_cpu_flush

2015-01-13 Thread Hans Petter Selasky
On 01/13/15 16:40, Ian Lepore wrote: On Tue, 2015-01-13 at 16:27 +0100, Hans Petter Selasky wrote: On 01/13/15 15:49, Ian Lepore wrote: On Tue, 2015-01-13 at 00:14 -0700, kott wrote: Yes with cache disabled, this problem is not seen. Seems to be with a issue with l2 cache. Thanks kott Except

Re: usb_pc_cpu_flush

2015-01-13 Thread Ian Lepore
On Tue, 2015-01-13 at 16:27 +0100, Hans Petter Selasky wrote: > On 01/13/15 15:49, Ian Lepore wrote: > > On Tue, 2015-01-13 at 00:14 -0700, kott wrote: > >> Yes with cache disabled, this problem is not seen. Seems to be with a issue > >> with l2 cache. > >> Thanks kott > > > > Except that there are

Re: usb_pc_cpu_flush

2015-01-13 Thread Hans Petter Selasky
On 01/13/15 15:49, Ian Lepore wrote: On Tue, 2015-01-13 at 00:14 -0700, kott wrote: Yes with cache disabled, this problem is not seen. Seems to be with a issue with l2 cache. Thanks kott Except that there are no known problems with l2 cache on armv7 right now. There are known problems with th

Re: usb_pc_cpu_flush

2015-01-13 Thread Ian Lepore
On Tue, 2015-01-13 at 00:14 -0700, kott wrote: > Yes with cache disabled, this problem is not seen. Seems to be with a issue > with l2 cache. > Thanks kott Except that there are no known problems with l2 cache on armv7 right now. There are known problems with the USB driver using the busdma routi

Re: usb_pc_cpu_flush

2015-01-13 Thread kott
Yes with cache disabled, this problem is not seen. Seems to be with a issue with l2 cache. Thanks kott -- View this message in context: http://freebsd.1045724.n5.nabble.com/usb-pc-cpu-flush-tp5975583p5980199.html Sent from the freebsd-usb mailing list archive at Nabble.com.

Re: usb_pc_cpu_flush

2014-12-29 Thread kott
Will check with cache disabled. this may be the problem -- View this message in context: http://freebsd.1045724.n5.nabble.com/usb-pc-cpu-flush-tp5975583p5976832.html Sent from the freebsd-usb mailing list archive at Nabble.com. ___ freebsd-usb@freeb

Re: usb_pc_cpu_flush

2014-12-25 Thread Hans Petter Selasky
Hi, There might be an option somewhere you can set in the boot enviroment, which will disable the CPU cache ... I guess something is failing in that area. Else we would see the same with regular PCs too. --HPS ___ freebsd-usb@freebsd.org mailing lis

Re: usb_pc_cpu_flush

2014-12-24 Thread Hans Petter Selasky
On 12/24/14 15:35, kott via freebsd-usb wrote: did try with freebsd11 also and it fails in the same point at usb_pc_cpu_flush. Is this a known issue ? any suggestions would help This is not a known issue. Which ARM kernel are you building? --HPS __

Re: usb_pc_cpu_flush

2014-12-24 Thread kott via freebsd-usb
did try with freebsd11 also and it fails in the same point at usb_pc_cpu_flush. Is this a known issue ? any suggestions would help -- View this message in context: http://freebsd.1045724.n5.nabble.com/usb-pc-cpu-flush-tp5975583p5975773.html Sent from the freebsd-usb mailing list archive at Nab

Re: usb_pc_cpu_flush

2014-12-24 Thread Hans Petter Selasky
On 12/24/14 13:22, kott via freebsd-usb wrote: This platform is armv7 freebsd10. it does fail in the second usb_pc_cpu_flush Did you try booting a freebsd11 kernel? --HPS ___ freebsd-usb@freebsd.org mailing list http://lists.freebsd.org/mailman/li

Re: usb_pc_cpu_flush

2014-12-24 Thread kott via freebsd-usb
This platform is armv7 freebsd10. it does fail in the second usb_pc_cpu_flush -- View this message in context: http://freebsd.1045724.n5.nabble.com/usb-pc-cpu-flush-tp5975583p5975763.html Sent from the freebsd-usb mailing list archive at Nabble.com. _

Re: usb_pc_cpu_flush

2014-12-24 Thread kott via freebsd-usb
Thanks platform is freebsd10 , armv7 based. -- View this message in context: http://freebsd.1045724.n5.nabble.com/usb-pc-cpu-flush-tp5975583p5975752.html Sent from the freebsd-usb mailing list archive at Nabble.com. ___ freebsd-usb@freebsd.org maili

Re: usb_pc_cpu_flush

2014-12-24 Thread Hans Petter Selasky
On 12/24/14 04:41, kott via freebsd-usb wrote: the value of "r0" is 0. Hi, In the function "_ehci_append_qh" do you know if it is the second or first call to "usb_pc_cpu_flush" which fails. The pointer which is passed as an argument to this function resides in the memory which is flushed,

Re: usb_pc_cpu_flush

2014-12-23 Thread kott via freebsd-usb
the value of "r0" is 0. >> _ehci_append_qh: 0xf3dd2300 to 0xf3dc3c00 Kernel page fault with the following non-sleepable locks held: exclusive sleep mutex ehci0 (usb_def_mtx) r = 0 (0xc73ece74) locked sys/dev/usb/usb_transfer.c exclusive sleep mutex USB device mutex (USB device mutex) r = 0 (0x

Re: usb_pc_cpu_flush

2014-12-23 Thread Hans Petter Selasky
On 12/23/14 19:26, kott wrote: Hello - I am seeing this fault when i plugin a external usb device, and was wondering if this indicates DMA/Cache coherency problem - _ehci_append_qh: 0xf3dd2300 to 0xf3dc3c00 Kernel page fault with the following non-sleepable locks held: exclusive sleep mutex e