From owner-freebsd-stable@FreeBSD.ORG Sun May 23 17:00:56 2004 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6E72F16A4CE for ; Sun, 23 May 2004 17:00:56 -0700 (PDT) Received: from auk2.snu.ac.kr (auk2.snu.ac.kr [147.46.100.32]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1CD3B43D1F for ; Sun, 23 May 2004 17:00:56 -0700 (PDT) (envelope-from stopspam@users.sourceforge.net) Received: from [147.46.44.181] (stopspam@users.sourceforge.net) by auk2.snu.ac.kr (Terrace Internet Messaging Server) with ESMTP id 2004052408:43:12:776891.13435.2626239408 for ; Mon, 24 May 2004 08:43:12 +0900 (KST) Message-ID: <40B13B26.10201@users.sourceforge.net> Date: Mon, 24 May 2004 09:00:38 +0900 From: Rob User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040507 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-stable@freebsd.org, iedowse@maths.tcd.ie References: <200405232109.aa46210@salmon.maths.tcd.ie> In-Reply-To: <200405232109.aa46210@salmon.maths.tcd.ie> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-TERRACE-SPAMMARK: YES-__TRSYS_LV__3 (SR:-2.03) (SRN:SPAMROBOT) ----------------- Subject: Re: USB patch for better bus_dma and detachment support X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 May 2004 00:00:56 -0000 Ian Dowse wrote: > In case anybody is interested in testing or helping with this, > there's a patch at > > http://people.freebsd.org/~iedowse/usb.diff > > that attempts to begin addressing a number of problems with our > current USB code: > > o All data buffers were allocated using bus_dma as physically > contiguous memory. All transfers involve a memory copy to/from > these contiguous buffers, and the contiguous memory is never > freed. Use of these buffers is also inefficient, so low-memory > systems tend to quickly run out of usable physical memory. > > o USB host controllers cannot be detached, so for example, unplugging > a cardbus USB device will cause a crash. > > Neither of these issues is completely solved by the patch, but most > I/O now avoids the need for contiguous buffers by using bus_dmamap_load() > on the virtual buffer, and the system seems to survive the removal > of a cardbus OHCI/EHCI controller, though memory is probably leaked. Can I apply this patch safely to STABLE as well? If not, then, if you make a patch for STABLE, I would test it right away! My umass storage USB toy, crashes the system when I umount it. I blamed the USB chipset (VIA 83C572 USB controller), but am still not sure, since I did not get much response from the STABLE mailing list. It would be great if your patch would solve the crash! Regards, Rob.