Make this work after it got broken a year ago in r1.15 (pasto?):
In qeattach() sc->sc_rb.rb_dmabase needs to be set after the buffer got loaded via bus_dmamem_map(), not before. Fixes my own pr kern/15817.
This commit is contained in:
parent
9481b68d9a
commit
089f361f5b
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: qe.c,v 1.19 2001/11/13 06:58:17 lukem Exp $ */
|
||||
/* $NetBSD: qe.c,v 1.20 2002/03/06 19:10:58 frueauf Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
|
@ -73,7 +73,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: qe.c,v 1.19 2001/11/13 06:58:17 lukem Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: qe.c,v 1.20 2002/03/06 19:10:58 frueauf Exp $");
|
||||
|
||||
#define QEDEBUG
|
||||
|
||||
|
@ -286,7 +286,6 @@ qeattach(parent, self, aux)
|
|||
self->dv_xname, error);
|
||||
return;
|
||||
}
|
||||
sc->sc_rb.rb_dmabase = sc->sc_dmamap->dm_segs[0].ds_addr;
|
||||
|
||||
/* Map DMA buffer in CPU addressable space */
|
||||
if ((error = bus_dmamem_map(dmatag, &seg, rseg, size,
|
||||
|
@ -308,6 +307,7 @@ qeattach(parent, self, aux)
|
|||
bus_dmamem_free(dmatag, &seg, rseg);
|
||||
return;
|
||||
}
|
||||
sc->sc_rb.rb_dmabase = sc->sc_dmamap->dm_segs[0].ds_addr;
|
||||
|
||||
/* Initialize media properties */
|
||||
ifmedia_init(&sc->sc_ifmedia, 0, qe_ifmedia_upd, qe_ifmedia_sts);
|
||||
|
|
Loading…
Reference in New Issue