diff options
Diffstat (limited to 'sys/dev/en/midwayvar.h')
-rw-r--r-- | sys/dev/en/midwayvar.h | 36 |
1 files changed, 23 insertions, 13 deletions
diff --git a/sys/dev/en/midwayvar.h b/sys/dev/en/midwayvar.h index 7cbd3b2..f95414c 100644 --- a/sys/dev/en/midwayvar.h +++ b/sys/dev/en/midwayvar.h @@ -124,19 +124,31 @@ struct en_txslot { * card. */ struct en_rxslot { - void *rxhand; /* recv. handle for direct delivery */ uint32_t mode; /* saved copy of mode info */ uint32_t start; /* begin of my buffer area */ uint32_t stop; /* end of my buffer area */ uint32_t cur; /* where I am at in the buffer */ - uint16_t atm_vci; /* backpointer to VCI */ - uint8_t atm_flags; /* copy of atm_flags from atm_ph */ - uint8_t oth_flags; /* other flags */ - uint32_t raw_threshold; /* for raw mode */ + struct en_vcc *vcc; /* backpointer to VCI */ struct ifqueue q; /* mbufs waiting for dma now */ struct ifqueue indma; /* mbufs being dma'd now */ }; +struct en_vcc { + struct atmio_vcc vcc; /* required by common code */ + void *rxhand; + uint vflags; + uint32_t ipackets; + uint32_t opackets; + uint32_t ibytes; + uint32_t obytes; + + uint8_t txspeed; + struct en_txslot *txslot; /* transmit slot */ + struct en_rxslot *rxslot; /* receive slot */ +}; +#define VCC_DRAIN 0x0001 /* closed, but draining rx */ +#define VCC_SWSL 0x0002 /* on rx software service list */ + /* * softc */ @@ -176,16 +188,13 @@ struct en_softc { /* xmit buf ctrl. (per channel) */ struct en_txslot txslot[MID_NTX_CH]; - /* xmit vc ctrl. (per vc) */ - uint8_t txspeed[MID_N_VC]; /* speed of tx on a VC */ - uint8_t txvc2slot[MID_N_VC]; /* map VC to slot */ - - /* recv vc ctrl. (per vc). maps VC number to recv slot */ - uint16_t rxvc2slot[MID_N_VC]; - int en_nrx; /* # of active rx slots */ - /* recv buf ctrl. (per recv slot) */ struct en_rxslot rxslot[EN_MAXNRX]; + int en_nrx; /* # of active rx slots */ + + /* vccs */ + struct en_vcc **vccs; + u_int vccs_open; /* stats */ struct en_stats stats; @@ -228,3 +237,4 @@ int en_attach(struct en_softc *); void en_destroy(struct en_softc *); void en_intr(void *); void en_reset(struct en_softc *); +int en_modevent(module_t, int, void *arg); |