From owner-freebsd-usb@FreeBSD.ORG Sat Nov 8 10:21:04 2008 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 4BC581065688; Sat, 8 Nov 2008 10:21:04 +0000 (UTC) (envelope-from hselasky@freebsd.org) Received: from swip.net (mailfe11.swipnet.se [212.247.155.65]) by mx1.freebsd.org (Postfix) with ESMTP id A80608FC14; Sat, 8 Nov 2008 10:21:03 +0000 (UTC) (envelope-from hselasky@freebsd.org) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=hN6knYnE7gQA:10 a=rkljZNIgkfMA:10 a=d6BVkb5LuPPVEe4iNQMLyA==:17 a=6I5d2MoRAAAA:8 a=W78u3t4z9fC-1301qEQA:9 a=e-XVigr01P9WP5lqhrgA:7 a=eDEVA2Hv9mz7cDL_P0N60pZAM3wA:4 a=50e4U0PicR4A:10 Received: from [62.113.135.6] (account mc467741@c2i.net [62.113.135.6] verified) by mailfe11.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 972523298; Sat, 08 Nov 2008 10:21:00 +0100 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Sat, 8 Nov 2008 10:23:09 +0100 User-Agent: KMail/1.9.7 References: <20081107082740.GA1334@icarus.home.lan> <200811071811.27181.hselasky@c2i.net> <20081108001128.GA1437@icarus.home.lan> In-Reply-To: <20081108001128.GA1437@icarus.home.lan> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200811081023.10058.hselasky@freebsd.org> Cc: freebsd-current@freebsd.org Subject: Serious busdma bug in -current in relation to USB harware. 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: Sat, 08 Nov 2008 10:21:04 -0000 Hi, The virtual offset must be retained on bounce pages. Else the EHCI and OHCI will misplace the data! It has nothing to do with my new USB stack. That is the way the USB DMA engine works. It expects that when the end of the page is reached the next page begins. Moving a partially a page to the beginning of a page gets the USB DMA engine out of sync, and it will actually fill data into the remaining part of the first page, if the transfer length is greater than the partial page part. I've made a fix in P4 for I386. Can someone propagate this patch to the other platforms and have it committed to -current ASAP? http://perforce.freebsd.org/chv.cgi?CH=152649 --HPS