summaryrefslogtreecommitdiff
path: root/sys/dev/ic/gemvar.h
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2001-10-03 18:18:02 +0000
committerJason Wright <jason@cvs.openbsd.org>2001-10-03 18:18:02 +0000
commit2070513a3168e6fe6da4afea108cb69abff9350a (patch)
tree82dc710c7ba23823515adfbe6bfb69130bc249a9 /sys/dev/ic/gemvar.h
parent5795c93970de841b8bb407df95850bfa8e36879c (diff)
Rewrite transmit handling (looks something more like hme), also takes advantage
of some register shadowing provided by the asic. [This still isn't optimal, but it's getting closer...] Move all of the stat stuff out of the interrupt context and into the timeout.
Diffstat (limited to 'sys/dev/ic/gemvar.h')
-rw-r--r--sys/dev/ic/gemvar.h26
1 files changed, 8 insertions, 18 deletions
diff --git a/sys/dev/ic/gemvar.h b/sys/dev/ic/gemvar.h
index 9fdb68a3c67..35eb25277fe 100644
--- a/sys/dev/ic/gemvar.h
+++ b/sys/dev/ic/gemvar.h
@@ -51,6 +51,11 @@
#define GEM_NTXDESC_MASK (GEM_NTXDESC - 1)
#define GEM_NEXTTX(x) ((x + 1) & GEM_NTXDESC_MASK)
+struct gem_sxd {
+ struct mbuf *sd_mbuf;
+ bus_dmamap_t sd_map;
+};
+
/*
* Receive descriptor list size. We have one Rx buffer per incoming
* packet, so this logic is a little simpler.
@@ -81,20 +86,6 @@ struct gem_control_data {
#define GEM_CDRXOFF(x) GEM_CDOFF(gcd_rxdescs[(x)])
/*
- * Software state for transmit jobs.
- */
-struct gem_txsoft {
- struct mbuf *txs_mbuf; /* head of our mbuf chain */
- bus_dmamap_t txs_dmamap; /* our DMA map */
- int txs_firstdesc; /* first descriptor in packet */
- int txs_lastdesc; /* last descriptor in packet */
- int txs_ndescs; /* number of descriptors */
- SIMPLEQ_ENTRY(gem_txsoft) txs_q;
-};
-
-SIMPLEQ_HEAD(gem_txsq, gem_txsoft);
-
-/*
* Software state for receive jobs.
*/
struct gem_rxsoft {
@@ -169,7 +160,9 @@ struct gem_softc {
/*
* Software state for transmit and receive descriptors.
*/
- struct gem_txsoft sc_txsoft[GEM_TXQUEUELEN];
+ struct gem_sxd sc_txd[GEM_NTXDESC];
+ u_int32_t sc_tx_cnt, sc_tx_prod, sc_tx_cons;
+
struct gem_rxsoft sc_rxsoft[GEM_NRXDESC];
/*
@@ -187,9 +180,6 @@ struct gem_softc {
u_int32_t sc_setup_fsls; /* FS|LS on setup descriptor */
- struct gem_txsq sc_txfreeq; /* free Tx descsofts */
- struct gem_txsq sc_txdirtyq; /* dirty Tx descsofts */
-
int sc_rxptr; /* next ready RX descriptor/descsoft */
/* ========== */