Date: Sat, 09 Aug 2003 00:46:31 -0600 From: Scott Long <scottl@freebsd.org> To: kwsn@earthlink.net Cc: current@freebsd.org Subject: Re: busdma/scsi trm(4) related panic Message-ID: <3F3498C7.4050301@freebsd.org> In-Reply-To: <1060297238.86991.0.camel@jonnyv.kwsn.lan> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
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
[-- Attachment #2 --]
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);
}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3F3498C7.4050301>
