From owner-freebsd-current@FreeBSD.ORG Fri Aug 8 23:46:34 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ABE1437B401 for ; Fri, 8 Aug 2003 23:46:34 -0700 (PDT) Received: from smtp.mho.com (smtp.mho.net [64.58.4.6]) by mx1.FreeBSD.org (Postfix) with SMTP id B5BB943FE0 for ; Fri, 8 Aug 2003 23:46:32 -0700 (PDT) (envelope-from scottl@freebsd.org) Received: (qmail 52389 invoked by uid 1002); 9 Aug 2003 06:46:31 -0000 Received: from unknown (HELO freebsd.org) (64.58.1.252) by smtp.mho.net with SMTP; 9 Aug 2003 06:46:31 -0000 Message-ID: <3F3498C7.4050301@freebsd.org> Date: Sat, 09 Aug 2003 00:46:31 -0600 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3) Gecko/20030425 X-Accept-Language: en-us, en MIME-Version: 1.0 To: kwsn@earthlink.net References: <1060150112.778.33.camel@jonnyv.kwsn.lan> <20030806120014.GA49458@crodrigues.org> <1060175866.657.15.camel@jonnyv.kwsn.lan> <3F3105AE.1080506@freebsd.org> <1060297238.86991.0.camel@jonnyv.kwsn.lan> In-Reply-To: <1060297238.86991.0.camel@jonnyv.kwsn.lan> Content-Type: multipart/mixed; boundary="------------050009050306050105010508" cc: current@freebsd.org Subject: Re: busdma/scsi trm(4) related panic X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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, 09 Aug 2003 06:46:35 -0000 This is a multi-part message in MIME format. --------------050009050306050105010508 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Jon Kuster wrote: > On Wed, 2003-08-06 at 06:42, Scott Long wrote: > >>I know what the problem is and I'm working on a patch right now. >> >>Scott > > > Excellent. I'll be happy to test it if needed. > > Jon > > Attached is an untested patch. Please let me know if it solves the problem Scott --------------050009050306050105010508 Content-Type: text/plain; name="trm.c.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="trm.c.diff" Index: trm.c =================================================================== RCS file: /home/ncvs/src/sys/dev/trm/trm.c,v retrieving revision 1.12 diff -u -r1.12 trm.c --- trm.c 1 Jul 2003 15:52:02 -0000 1.12 +++ trm.c 9 Aug 2003 06:45:05 -0000 @@ -2999,6 +2999,7 @@ { u_int16_t i; PSRB pSRB; + int error; for (i = 0; i < TRM_MAX_SRB_CNT; i++) { pSRB = (PSRB)&pACB->pFreeSRB[i]; @@ -3040,6 +3041,17 @@ pSRB->pNextSRB = NULL; } pSRB->TagNumber = i; + + /* + * Create the dmamap. This is no longer optional! + * + * XXX This is not freed on unload! None of the other + * allocations in this function are either! + */ + if ((error = bus_dmamap_create(pACB->buffer_dmat, 0, + &pSRB->dmamap)) != 0) + return (error); + } return (0); } --------------050009050306050105010508--