From owner-freebsd-current@FreeBSD.ORG Sat Nov 8 16:25:03 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4CD28106564A; Sat, 8 Nov 2008 16:25:03 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe05.swip.net [212.247.154.129]) by mx1.freebsd.org (Postfix) with ESMTP id AC9608FC0C; Sat, 8 Nov 2008 16:25:02 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=dHLmn-RhnaEA:10 a=d4Qm339WgMUA:10 a=d6BVkb5LuPPVEe4iNQMLyA==:17 a=W7yW5RWIGnIUdAu0NoAA:9 a=t7RMLOW7sXuN4nJvu2FY-nvfdNEA:4 a=LY0hPdMaydYA:10 Received: from [62.113.135.6] (account mc467741@c2i.net [62.113.135.6] verified) by mailfe05.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1042886932; Sat, 08 Nov 2008 17:25:01 +0100 From: Hans Petter Selasky To: freebsd-current@freebsd.org Date: Sat, 8 Nov 2008 17:27:06 +0100 User-Agent: KMail/1.9.7 References: <20081107082740.GA1334@icarus.home.lan> <200811081023.10058.hselasky@freebsd.org> <200811081353.09697.hselasky@c2i.net> In-Reply-To: <200811081353.09697.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200811081727.08788.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: (FWD) Serious busdma bug in -current in relation to USB harware. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Nov 2008 16:25:03 -0000 On Saturday 08 November 2008, Hans Petter Selasky wrote: > On Saturday 08 November 2008, Alexander Motin wrote: > What is the real reason to do that? If you are saying that you uses > 1-byte alignment then you should be able to accept _any_ address that > busdma will allocate to you! Why original data alignment should so > strictly affect hardware operation? Hi, The real reason is that the EHCI and OHCI only takes the full physical address of the _first_ page, and then for the subsequent pages only stores the upper bits of the physical address, leaving it impossible to program a per-page data start offset. The hardware assumes that the lower part of the physical address wraps modulo PAGE_SIZE, and that's it. Don't ask me why they designed it like that. Currently USB is broken on all architectures where bouncing is used. I see no other way around this than to change busdma. --HPS