Date: Tue, 22 Dec 2015 06:47:42 -0800 From: Adrian Chadd <adrian@freebsd.org> To: ticso@cicely.de Cc: Eugene Grosbein <eugen@grosbein.net>, "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org> Subject: Re: L2 cache management and busdma - or, "damnit USB, who you not like me" Message-ID: <CAJ-Vmom83=t_pXRB93eoRq_v4eM_uxXmVKo0xqN-u%2B3fy6QbqQ@mail.gmail.com> In-Reply-To: <20151222112653.GB21902@cicely7.cicely.de> References: <CAJ-Vmo=0E2%2B6=2JKROvw7i92qsrgoSnH0tDYSDLBk8s%2Bs6nEJQ@mail.gmail.com> <5678DAF8.6000807@grosbein.net> <CAJ-VmomkmJy_P0-mDZA2TzS7viJ9GZH86sRZ5DAiV_eW6gFS0A@mail.gmail.com> <20151222112653.GB21902@cicely7.cicely.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On 22 December 2015 at 03:26, Bernd Walter <ticso@cicely7.cicely.de> wrote: > On Tue, Dec 22, 2015 at 12:12:55AM -0800, Adrian Chadd wrote: >> hi, >> >> It shouldn't be - the atheros mips doesn't have l2 cache. >> >> I wish I could reproduce your issue. :( > > It is strange that you couldn't reproduce the problem. > For me It happened on so many HW combinations of sticks and magnetic USB drive, > with different AR9331 boards and also with the WDR-4300. > On the other hand I know someone with a stable SATA-HDD on USB converter connected > to a Carambola2, which is something I couldn't reproduce. > Nevertheless, it is not a filesystem corruption thing. To me it is more suspect > to corruption in USB controller request memory and not in the bulk payload. > However, I have no evidence to proove this theory. When my living situation is saner I'll setup a proper test bench and test lots of combinations. :) -a >> On 21 December 2015 at 21:09, Eugene Grosbein <eugen@grosbein.net> wrote: >> > On 21.12.2015 12:02, Adrian Chadd wrote: >> >> hi, >> >> >> >> I've been poking at the ci20 port to bring it up to >> >> self-booting/running, and this involves using USB1 as a rootfs. Yeah, >> >> I know, ohci, but that's what I have for now. >> >> >> >> Anyway, there was filesystem corruption, so I went digging into it and >> >> found that we just weren't taking L2 cache line size into account when >> >> doing the busdma bits. The JZ4780 SoC has 32 byte L1 lines, and 128 >> >> byte L2 lines. Oops >> >> >> >> So, two things are needed: >> >> >> >> * for the ci20 port, which isn't in the mainline tree yet, we need to >> >> use USB_HOST_ALIGN=128, and >> >> * we need to teach the busdma code about the maximum line size, not >> >> just the L1 line size. >> >> >> >> Here's a diff that does the latter: >> >> >> >> https://people.freebsd.org/~adrian/mips/mips-fix-dcache-busdma.diff >> >> >> >> I'm going to test this out on my L1-only platforms (read: atheros) tomorrow. >> >> >> >> Does anyone have any comments? >> > >> > Can that be the source of my USB problems? Total system hang while doing lots of umass I/O >> > with TP-Link TL-WDR3600? If yes, I'd like to re-run my tests with these new patches. > > -- > B.Walter <bernd@bwct.de> http://www.bwct.de > Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmom83=t_pXRB93eoRq_v4eM_uxXmVKo0xqN-u%2B3fy6QbqQ>