Date: Sat, 09 Aug 2003 00:53:57 -0600 From: Scott Long <scottl@freebsd.org> To: Ruslan Ermilov <ru@freebsd.org>, current@freebsd.org Subject: Re: busdma/scsi trm(4) related panic Message-ID: <3F349A85.3040305@freebsd.org> In-Reply-To: <20030807122637.GA5904@sunbay.com> 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>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
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
[-- Attachment #2 --]
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);
}
}
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3F349A85.3040305>
