From owner-freebsd-current@FreeBSD.ORG Fri Aug 8 23:53:59 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 32C1037B401 for ; Fri, 8 Aug 2003 23:53:59 -0700 (PDT) Received: from smtp.mho.com (smtp.mho.net [64.58.4.6]) by mx1.FreeBSD.org (Postfix) with SMTP id 99EDD43F93 for ; Fri, 8 Aug 2003 23:53:57 -0700 (PDT) (envelope-from scottl@freebsd.org) Received: (qmail 52463 invoked by uid 1002); 9 Aug 2003 06:53:57 -0000 Received: from unknown (HELO freebsd.org) (64.58.1.252) by smtp.mho.net with SMTP; 9 Aug 2003 06:53:57 -0000 Message-ID: <3F349A85.3040305@freebsd.org> Date: Sat, 09 Aug 2003 00:53:57 -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: Ruslan Ermilov , current@freebsd.org References: <1060150112.778.33.camel@jonnyv.kwsn.lan> <20030806120014.GA49458@crodrigues.org> <1060175866.657.15.camel@jonnyv.kwsn.lan> <3F3105AE.1080506@freebsd.org> <20030807122637.GA5904@sunbay.com> In-Reply-To: <20030807122637.GA5904@sunbay.com> Content-Type: multipart/mixed; boundary="------------020603050200000405050207" 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:53:59 -0000 This is a multi-part message in MIME format. --------------020603050200000405050207 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Ruslan Ermilov wrote: > On Wed, Aug 06, 2003 at 07:42:06AM -0600, Scott Long wrote: > >>I know what the problem is and I'm working on a patch right now. >> > > I have the same problem with amd(4) and this commit to busdma_machdep.c. > > > Cheers, Attached is an untested patch for amd(4). Please let me know if it fixes your problem. Scott --------------020603050200000405050207 Content-Type: text/plain; name="amd.c.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="amd.c.diff" Index: amd.c =================================================================== RCS file: /home/ncvs/src/sys/dev/amd/amd.c,v retrieving revision 1.22 diff -u -r1.22 amd.c --- amd.c 31 Jul 2003 16:55:44 -0000 1.22 +++ amd.c 9 Aug 2003 06:44:28 -0000 @@ -2115,12 +2115,26 @@ { u_int16_t count, i; struct amd_srb *psrb; + int error; count = amd->SRBCount; for (i = 0; i < count; i++) { psrb = (struct amd_srb *)&amd->SRB_array[i]; psrb->TagNumber = i; + + /* + * Create the dmamap. This is no longer optional! + * + * XXX Since there is no detach method in this driver, + * this does not get freed! + */ + if ((error = bus_dmamap_create(amd->buffer_dmat, 0, + &psrb->dmamap)) != 0) { + device_printf(amd->dev, "Error %d creating buffer " + "dmamap!\n", error); + return; + } TAILQ_INSERT_TAIL(&amd->free_srbs, psrb, links); } } --------------020603050200000405050207--