From 4cefebdf8dadef7e6190127442f5a92d777c60b5 Mon Sep 17 00:00:00 2001 From: pk Date: Tue, 20 Mar 2001 15:39:20 +0000 Subject: [PATCH] Fix fall-out from previous change: the map's DMA address is valid only after bus_dmamap_load(). --- sys/dev/sbus/be.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/sbus/be.c b/sys/dev/sbus/be.c index 3428ba66f545..3a976268d6bc 100644 --- a/sys/dev/sbus/be.c +++ b/sys/dev/sbus/be.c @@ -1,4 +1,4 @@ -/* $NetBSD: be.c,v 1.25 2001/03/08 02:20:39 thorpej Exp $ */ +/* $NetBSD: be.c,v 1.26 2001/03/20 15:39:20 pk Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -335,7 +335,6 @@ beattach(parent, self, aux) self->dv_xname, error); return; } - sc->sc_rb.rb_dmabase = sc->sc_dmamap->dm_segs[0].ds_addr; /* Map DMA memory in CPU addressable space */ if ((error = bus_dmamem_map(sa->sa_dmatag, &seg, rseg, size, @@ -357,6 +356,7 @@ beattach(parent, self, aux) bus_dmamem_free(dmatag, &seg, rseg); return; } + sc->sc_rb.rb_dmabase = sc->sc_dmamap->dm_segs[0].ds_addr; /* * Initialize our media structures and MII info.