Compaq Smart Array 5i panic w/ Dragonfly 1.2

Joerg Sonnenberger joerg at britannica.bec.de
Sat Apr 23 14:14:12 PDT 2005


On Sat, Apr 23, 2005 at 04:02:56PM -0500, Bill Marquette wrote:
> On 4/23/05, Joerg Sonnenberger <joerg at xxxxxxxxxxxxxxxxx> wrote:
> > Please try the attached patch.
> 
> Joerg, I'm not sure if we're getting closer, but it panics in a
> different place now.

Sorry, I should sleep more. Try again :)

Joerg
Index: ciss.c
===================================================================
RCS file: /home/joerg/wd/repository/dragonflybsd/src/sys/dev/raid/ciss/ciss.c,v
retrieving revision 1.12
diff -u -r1.12 ciss.c
--- ciss.c	1 Feb 2005 02:16:58 -0000	1.12
+++ ciss.c	23 Apr 2005 21:12:39 -0000
@@ -760,6 +760,7 @@
 	ciss_printf(sc, "can't allocate command memory\n");
 	return(ENOMEM);
     }
+    bus_dmamap_create(sc->ciss_command_dmat, 0, &sc->ciss_command_map);
     bus_dmamap_load(sc->ciss_command_dmat, sc->ciss_command_map, sc->ciss_command, 
 		    sizeof(struct ciss_command) * sc->ciss_max_requests,
 		    ciss_command_map_helper, sc, 0);
@@ -1378,6 +1379,7 @@
     if (sc->ciss_command != NULL) {
 	bus_dmamap_unload(sc->ciss_command_dmat, sc->ciss_command_map);
 	bus_dmamem_free(sc->ciss_command_dmat, sc->ciss_command, sc->ciss_command_map);
+	bus_dmamap_destroy(sc->ciss_command_dmat, sc->ciss_command_map);
     }
     if (sc->ciss_buffer_dmat)
 	bus_dma_tag_destroy(sc->ciss_command_dmat);
@@ -1992,6 +1994,7 @@
     if ((cr->cr_flags & CISS_REQ_MAPPED) || (cr->cr_data == NULL))
 	return(0);
     
+    bus_dmamap_create(sc->ciss_buffer_dmat, 0, &cr->cr_datamap);
     bus_dmamap_load(sc->ciss_buffer_dmat, cr->cr_datamap, cr->cr_data, cr->cr_length,
 		    ciss_request_map_helper, CISS_FIND_COMMAND(cr), 0);
 	
@@ -2045,6 +2048,7 @@
 	bus_dmamap_sync(sc->ciss_buffer_dmat, cr->cr_datamap, BUS_DMASYNC_POSTWRITE);
 
     bus_dmamap_unload(sc->ciss_buffer_dmat, cr->cr_datamap);
+    bus_dmamap_destroy(sc->ciss_buffer_dmat, cr->cr_datamap);
     cr->cr_flags &= ~CISS_REQ_MAPPED;
 }
 




More information about the Bugs mailing list