diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2007-03-19 23:28:24 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2007-03-19 23:28:24 +0000 |
commit | b33f22444e47326485741fe540219789de10b036 (patch) | |
tree | 984ac28a00facf73adaf70f0eb00fd175fe68e81 /sys/dev/ic | |
parent | 3b3a02b67165b90081d3c812486a8031a57d4e28 (diff) |
Only call bus_dmamap_unload() if we loaded a dmamap beforehand. Found out
the hard way on sparc64. Now acx(4) no longer panics but it does not yet
work. OK mglocker@
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/acx.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/ic/acx.c b/sys/dev/ic/acx.c index 6fd387ebf6d..a90b5d54dfb 100644 --- a/sys/dev/ic/acx.c +++ b/sys/dev/ic/acx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acx.c,v 1.68 2007/03/16 11:06:39 claudio Exp $ */ +/* $OpenBSD: acx.c,v 1.69 2007/03/19 23:28:23 claudio Exp $ */ /* * Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org> @@ -2105,7 +2105,8 @@ acx_newbuf(struct acx_softc *sc, struct acx_rxbuf *rb, int wait) } /* Unload originally mapped mbuf */ - bus_dmamap_unload(sc->sc_dmat, rb->rb_mbuf_dmamap); + if (rb->rb_mbuf != NULL) + bus_dmamap_unload(sc->sc_dmat, rb->rb_mbuf_dmamap); /* Swap this dmamap with tmp dmamap */ map = rb->rb_mbuf_dmamap; |