diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2001-09-17 16:24:50 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2001-09-17 16:24:50 +0000 |
commit | 76f468c03bc36d99a610594f847c0948d92aaa37 (patch) | |
tree | d0ecccbee08137897d0e9885fda75d34ed68a51f /sys/dev/ic/fxpvar.h | |
parent | 3750dd1365667e603a2b495f26596443df40feef (diff) |
Remove all of the last vestiges of vtophys (namely RFA's):
o stash bus_dmamap_t in the mbuf cluster (alignment fudge is now
2+sizeof(bus_dmamap_t)
o borrow FXP_RXMAP_{GET|PUT} macros from NetBSD
o move a few definitions around to make it all work
Diffstat (limited to 'sys/dev/ic/fxpvar.h')
-rw-r--r-- | sys/dev/ic/fxpvar.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sys/dev/ic/fxpvar.h b/sys/dev/ic/fxpvar.h index 06b0c4942cd..99c7f172676 100644 --- a/sys/dev/ic/fxpvar.h +++ b/sys/dev/ic/fxpvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: fxpvar.h,v 1.8 2001/08/25 14:55:14 jason Exp $ */ +/* $OpenBSD: fxpvar.h,v 1.9 2001/09/17 16:24:49 jason Exp $ */ /* $NetBSD: if_fxpvar.h,v 1.1 1997/06/05 02:01:58 thorpej Exp $ */ /* @@ -46,6 +46,12 @@ #define FXP_NTXCB 128 /* + * Number of receive frame area buffers. These are large so chose + * wisely. + */ +#define FXP_NRFABUFS 64 + +/* * NOTE: Elements are ordered for optimal cacheline behavior, and NOT * for functional grouping. */ @@ -98,6 +104,8 @@ struct fxp_softc { bus_dma_segment_t sc_cb_seg; int sc_cb_nseg; struct fxp_ctrl *sc_ctrl; + bus_dmamap_t sc_rxmaps[FXP_NRFABUFS]; + int sc_rxfree; }; /* Macros to ease CSR access. */ @@ -118,6 +126,9 @@ extern int fxp_intr __P((void *)); extern int fxp_attach_common __P((struct fxp_softc *, u_int8_t *, const char *)); extern int fxp_detach __P((struct fxp_softc *)); +#define FXP_RXMAP_GET(sc) ((sc)->sc_rxmaps[(sc)->sc_rxfree++]) +#define FXP_RXMAP_PUT(sc,map) ((sc)->sc_rxmaps[--(sc)->sc_rxfree] = (map)) + #ifdef __HAS_NEW_BUS_DMAMAP_SYNC #define fxp_bus_dmamap_sync(t, m, o, l, p) \ bus_dmamap_sync((t), (m), (o), (l), (p)) |