From owner-freebsd-sparc Tue Jan 21 3:44:12 2003 Delivered-To: freebsd-sparc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8FBB837B401 for ; Tue, 21 Jan 2003 03:44:10 -0800 (PST) Received: from mail.gmx.net (mail.gmx.net [213.165.65.60]) by mx1.FreeBSD.org (Postfix) with SMTP id 2198343EB2 for ; Tue, 21 Jan 2003 03:44:07 -0800 (PST) (envelope-from tmoestl@gmx.net) Received: (qmail 25611 invoked by uid 0); 21 Jan 2003 11:44:05 -0000 Received: from p508E517F.dip.t-dialin.net (HELO galatea.local) (80.142.81.127) by mail.gmx.net (mp011-rz3) with SMTP; 21 Jan 2003 11:44:05 -0000 Received: from localhost ([127.0.0.1] helo=galatea.local) by galatea.local with esmtp (Exim 4.12 #1) id 18awqz-0000Ho-00; Tue, 21 Jan 2003 12:46:05 +0100 Received: (from tmm@localhost) by galatea.local (8.12.6/8.12.6/Submit) id h0LBjiOE001099; Tue, 21 Jan 2003 12:45:44 +0100 (CET) Date: Tue, 21 Jan 2003 12:45:44 +0100 From: Thomas Moestl To: Harti Brandt Cc: Harti Brandt , sparc@freebsd.org Subject: Re: Problem with iommu_dvmamap_create Message-ID: <20030121114544.GA247@crow.dom2ip.de> Mail-Followup-To: Harti Brandt , Harti Brandt , sparc@freebsd.org References: <20030117160857.GB304@crow.dom2ip.de> <20030117171317.F44530@beagle.fokus.gmd.de> <20030117171111.GC304@crow.dom2ip.de> <20030117181111.R45050@beagle.fokus.gmd.de> <20030117173303.GD304@crow.dom2ip.de> <20030120103814.X45050@beagle.fokus.gmd.de> <20030120151712.GA240@crow.dom2ip.de> <20030120161832.K45050@beagle.fokus.gmd.de> <20030120192946.GB240@crow.dom2ip.de> <20030121114313.O80603@beagle.fokus.gmd.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030121114313.O80603@beagle.fokus.gmd.de> User-Agent: Mutt/1.4i Sender: owner-freebsd-sparc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Tue, 2003/01/21 at 11:46:55 +0100, Harti Brandt wrote: > On Mon, 20 Jan 2003, Thomas Moestl wrote: > TM>On Mon, 2003/01/20 at 16:40:56 +0100, Harti Brandt wrote: > TM>> Starting at seg[17] the segments are simply wrong. The number of segments > TM>> in the tag is 39 so this should work. (The numbers are the phys address > TM>> and segment length). > TM> > TM>Hmmmm, looks like the printf() part of the size check is still intact, > TM>did you forget to remove the break statement maybe? I don't see > TM>anything else that would make it stop exactly at BUS_DMAMAP_NSEGS. > > With the attached patch it looks better - it removes the check for > BUS_DMAMAP_NSEGS and also adds a break for promoting the error from > load_buffer back to load_mbuf and exit the loop there in case of an error. The latter should not be necessary, since the loop guard checks the return value. > TM>Yes, but I strongly suspect that the bug is only hidden by it, > TM>probably because it corrects the semantics of IOMMU_MAX_PRE_SEG, which > TM>effectively results in preallocation being reduced by one segment. I > TM>finally managed to reproduce similar behaviour, and think I might have > TM>a real fix. Can you please revert the previous patch (just to get a > TM>clean environment for reproducing the behaviour) and try again with > TM>just the attached patch applied? > > That seems to work. I have reverted both the change to subr_rman.c and > iommu.c (1.14) before applying your patch. Great! I'll commit the fixes soon. Thanks for testing! - Thomas -- Thomas Moestl http://www.tu-bs.de/~y0015675/ http://people.FreeBSD.org/~tmm/ PGP fingerprint: 1C97 A604 2BD0 E492 51D0 9C0F 1FE6 4F1D 419C 776C To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-sparc" in the body of the message