diff options
Diffstat (limited to 'sys/pci/if_fxpreg.h')
-rw-r--r-- | sys/pci/if_fxpreg.h | 40 |
1 files changed, 33 insertions, 7 deletions
diff --git a/sys/pci/if_fxpreg.h b/sys/pci/if_fxpreg.h index e2835ca..58971bd 100644 --- a/sys/pci/if_fxpreg.h +++ b/sys/pci/if_fxpreg.h @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: if_fxpreg.h,v 1.10 1997/09/05 10:23:56 davidg Exp $ */ #define FXP_VENDORID_INTEL 0x8086 @@ -78,7 +78,6 @@ #define FXP_SCB_STATACK_FR 0x40 #define FXP_SCB_STATACK_CXTNO 0x80 -#define FXP_SCB_COMMAND_MASK 0xff #define FXP_SCB_COMMAND_CU_NOP 0x00 #define FXP_SCB_COMMAND_CU_START 0x10 #define FXP_SCB_COMMAND_CU_RESUME 0x20 @@ -99,11 +98,13 @@ * Command block definitions */ struct fxp_cb_nop { + void *fill[2]; volatile u_int16_t cb_status; volatile u_int16_t cb_command; volatile u_int32_t link_addr; }; struct fxp_cb_ias { + void *fill[2]; volatile u_int16_t cb_status; volatile u_int16_t cb_command; volatile u_int32_t link_addr; @@ -111,6 +112,7 @@ struct fxp_cb_ias { }; /* I hate bit-fields :-( */ struct fxp_cb_config { + void *fill[2]; volatile u_int16_t cb_status; volatile u_int16_t cb_command; volatile u_int32_t link_addr; @@ -168,12 +170,38 @@ struct fxp_cb_config { mc_all:1, :4; }; + +#define MAXMCADDR 80 +struct fxp_cb_mcs { + struct fxp_cb_tx *next; + struct mbuf *mb_head; + volatile u_int16_t cb_status; + volatile u_int16_t cb_command; + volatile u_int32_t link_addr; + volatile u_int16_t mc_cnt; + volatile u_int8_t mc_addr[MAXMCADDR][6]; +}; + +/* + * Number of DMA segments in a TxCB. Note that this is carefully + * chosen to make the total struct size an even power of two. It's + * critical that no TxCB be split across a page boundry since + * no attempt is made to allocate physically contiguous memory. + * + */ +#ifdef __alpha__ /* XXX - should be conditional on pointer size */ +#define FXP_NTXSEG 28 +#else +#define FXP_NTXSEG 29 +#endif + struct fxp_tbd { volatile u_int32_t tb_addr; volatile u_int32_t tb_size; }; - struct fxp_cb_tx { + struct fxp_cb_tx *next; + struct mbuf *mb_head; volatile u_int16_t cb_status; volatile u_int16_t cb_command; volatile u_int32_t link_addr; @@ -184,9 +212,7 @@ struct fxp_cb_tx { /* * The following isn't actually part of the TxCB. */ - volatile struct fxp_tbd tbd[29]; - struct mbuf *mb_head; - struct fxp_cb_tx *next; + volatile struct fxp_tbd tbd[FXP_NTXSEG]; }; /* @@ -200,7 +226,7 @@ struct fxp_cb_tx { #define FXP_CB_COMMAND_NOP 0x0 #define FXP_CB_COMMAND_IAS 0x1 #define FXP_CB_COMMAND_CONFIG 0x2 -#define FXP_CB_COMMAND_MAS 0x3 +#define FXP_CB_COMMAND_MCAS 0x3 #define FXP_CB_COMMAND_XMIT 0x4 #define FXP_CB_COMMAND_RESRV 0x5 #define FXP_CB_COMMAND_DUMP 0x6 |