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
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);
        }
 }
_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to