Home | History | Annotate | Line # | Download | only in isa
if_levar.h revision 1.1
      1 /*	$NetBSD: if_levar.h,v 1.1 1995/07/24 18:04:39 mycroft Exp $	*/
      2 
      3 /*
      4  * LANCE Ethernet driver header file
      5  *
      6  * Copyright (c) 1994, 1995 Charles M. Hannum.  All rights reserved.
      7  *
      8  * Copyright (C) 1993, Paul Richards. This software may be used, modified,
      9  *   copied, distributed, and sold, in both source and binary form provided
     10  *   that the above copyright and these terms are retained. Under no
     11  *   circumstances is the author responsible for the proper functioning
     12  *   of this software, nor does the author assume any responsibility
     13  *   for damages incurred with its use.
     14  */
     15 
     16 /* Board types */
     17 #define	BICC		1
     18 #define	BICC_RDP	0xc
     19 #define	BICC_RAP	0xe
     20 
     21 #define	NE2100		2
     22 #define	NE2100_RDP	0x10
     23 #define	NE2100_RAP	0x12
     24 
     25 #define	DEPCA		3
     26 #define	DEPCA_CSR	0x0
     27 #define	DEPCA_CSR_SHE		0x80	/* Shared memory enabled */
     28 #define	DEPCA_CSR_SWAP32	0x40	/* Byte swapped */
     29 #define	DEPCA_CSR_DUM		0x08	/* rev E compatibility */
     30 #define	DEPCA_CSR_IM		0x04	/* Interrupt masked */
     31 #define	DEPCA_CSR_IEN		0x02	/* Interrupt enabled */
     32 #define	DEPCA_CSR_NORMAL \
     33 	(DEPCA_CSR_SHE | DEPCA_CSR_DUM | DEPCA_CSR_IEN)
     34 #define	DEPCA_RDP	0x4
     35 #define	DEPCA_RAP	0x6
     36 #define	DEPCA_ADP	0xc
     37 
     38 /* Chip types */
     39 #define	PROBE_MASK	0x0007
     40 #define	LANCE		1
     41 #define	LANCE_MASK	0x0007
     42 #define	PCnet_ISA	2
     43 #define	PCnet_ISA_MASK	0x0000
     44 
     45 /*
     46  * Ethernet software status per interface.
     47  *
     48  * Each interface is referenced by a network interface structure,
     49  * arpcom.ac_if, which the routing code uses to locate the interface.
     50  * This structure contains the output queue for the interface, its address, ...
     51  */
     52 struct le_softc {
     53 	struct	device sc_dev;		/* base structure */
     54 	struct	arpcom sc_arpcom;	/* Ethernet common part */
     55 
     56 	void	(*sc_copytodesc)();	/* Copy to descriptor */
     57 	void	(*sc_copyfromdesc)();	/* Copy from descriptor */
     58 
     59 	void	(*sc_copytobuf)();	/* Copy to buffer */
     60 	void	(*sc_copyfrombuf)();	/* Copy from buffer */
     61 	void	(*sc_zerobuf)();	/* and Zero bytes in buffer */
     62 
     63 	u_int16_t sc_conf3;		/* CSR3 value */
     64 
     65 	void	*sc_mem;		/* base address of RAM -- CPU's view */
     66 	u_long	sc_addr;		/* base address of RAM -- LANCE's view */
     67 	u_long	sc_memsize;		/* size of RAM */
     68 
     69 	int	sc_nrbuf;		/* number of receive buffers */
     70 	int	sc_ntbuf;		/* number of transmit buffers */
     71 	int	sc_last_rd;
     72 	int	sc_first_td, sc_last_td, sc_no_td;
     73 
     74 	int	sc_initaddr;
     75 	int	sc_rmdaddr;
     76 	int	sc_tmdaddr;
     77 	int	sc_rbufaddr;
     78 	int	sc_tbufaddr;
     79 
     80 #ifdef LEDEBUG
     81 	int	sc_debug;
     82 #endif
     83 
     84 	void	*sc_ih;
     85 	int	sc_chip, sc_card;
     86 	int	sc_rap, sc_rdp;		/* LANCE registers */
     87 };
     88