From owner-freebsd-usb@FreeBSD.ORG Fri Jul 17 12:48:32 2009 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33EC4106564A; Fri, 17 Jul 2009 12:48:32 +0000 (UTC) (envelope-from doginou@kanar.ci0.org) Received: from kanar.ci0.org (kanar.ci0.org [88.191.50.96]) by mx1.freebsd.org (Postfix) with ESMTP id BB0008FC15; Fri, 17 Jul 2009 12:48:31 +0000 (UTC) (envelope-from doginou@kanar.ci0.org) Received: from kanar.ci0.org (pluxor@localhost [127.0.0.1]) by kanar.ci0.org (8.14.2/8.14.3) with ESMTP id n6HCHlBk038919; Fri, 17 Jul 2009 14:17:47 +0200 (CEST) (envelope-from doginou@kanar.ci0.org) Received: (from doginou@localhost) by kanar.ci0.org (8.14.2/8.14.3/Submit) id n6HCHlve038918; Fri, 17 Jul 2009 14:17:47 +0200 (CEST) (envelope-from doginou) Date: Fri, 17 Jul 2009 14:17:46 +0200 From: Olivier Houchard To: Rafal Jaworowski Message-ID: <20090717121746.GA38852@ci0.org> References: <200906231035.43096.kosmo@semihalf.com> <200907162156.06598.hselasky@c2i.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i Cc: Marcel Moolenaar , freebsd-usb@freebsd.org, freebsd-arm@freebsd.org, thompsa@freebsd.org Subject: Re: CPU Cache and busdma usage in USB X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2009 12:48:32 -0000 On Fri, Jul 17, 2009 at 12:23:57PM +0200, Rafal Jaworowski wrote: > > >With the following patch in arm/cpufunc.c my UMASS device gets > >detected at > >boot time (KB9202B ARM board). Else I get a USB request timeout > >followed by a > >panic. But data transfers of more than 16KByte are likely to be > >broken. > > > >struct cpu_functions arm9_cpufuncs = { > >... > >- /*XXX*/ arm9_dcache_wbinv_range, /* dcache_inv_range */ > >+ /*XXX*/ arm9_dcache_inv_range, /* dcache_inv_range */ > > > >}; > > Hm, this looks indeed strange, but I have no idea why both methods > point to _wbinv_range; it seems like it was there from the beginning. > I also looked at NetBSD code (from which FreeBSD/arm originates) and > they still have it this way too... > > Olivier, any thoughts why this was done this way? > > (FYI: the cpu we work with fall under ARM9E/ARM10, but the situation > with dcache_inv_range() is similar as for ARM9 case above). > I can't get the reason why it's this way, reading the CVS logs from NetBSD doesn't enlight me, but I'm pretty sure we should switch to use the proper function for _inv_range, as done in this patch. That's what we do for Xscale/Xscale core 3 anyway, and if it breaks something, we should jut fix it. Olivier