if_ievar.h revision 118555
1112790Smdodd/*- 2112790Smdodd * $FreeBSD: head/sys/dev/ie/if_ievar.h 118555 2003-08-06 17:28:33Z bde $ 3112790Smdodd */ 4112790Smdodd 5112790Smdoddenum ie_hardware { 6112790Smdodd IE_NONE, 7112790Smdodd IE_STARLAN10, 8112790Smdodd IE_EN100, 9112790Smdodd IE_SLFIBER, 10112790Smdodd IE_3C507, 11112790Smdodd IE_NI5210, 12112790Smdodd IE_EE16, 13112790Smdodd IE_UNKNOWN 14112790Smdodd}; 15112790Smdodd 16112790Smdodd/* 17112790Smdodd * Ethernet status, per interface. 18112790Smdodd */ 19112790Smdoddstruct ie_softc { 20112790Smdodd struct arpcom arpcom; 21112790Smdodd void (*ie_reset_586) (struct ie_softc *); 22112790Smdodd void (*ie_chan_attn) (struct ie_softc *); 23112790Smdodd enum ie_hardware hard_type; 24112790Smdodd int hard_vers; 25112790Smdodd int unit; 26112790Smdodd 27112790Smdodd device_t dev; 28112790Smdodd 29112790Smdodd struct resource * io_res; 30112790Smdodd int io_rid; 31112790Smdodd bus_space_tag_t io_bt; 32112790Smdodd bus_space_handle_t io_bh; 33112790Smdodd 34112790Smdodd struct resource * irq_res; 35112790Smdodd int irq_rid; 36112790Smdodd void * irq_ih; 37112790Smdodd 38112790Smdodd struct resource * mem_res; 39112790Smdodd int mem_rid; 40112790Smdodd bus_space_tag_t mem_bt; 41112790Smdodd bus_space_handle_t mem_bh; 42112790Smdodd 43118555Sbde u_int port; /* i/o base address for this interface */ 44112790Smdodd caddr_t iomem; /* memory size */ 45112790Smdodd caddr_t iomembot; /* memory base address */ 46112790Smdodd unsigned iosize; 47112790Smdodd int bus_use; /* 0 means 16bit, 1 means 8 bit adapter */ 48112790Smdodd 49112790Smdodd int want_mcsetup; 50112790Smdodd int promisc; 51112790Smdodd int nframes; 52112790Smdodd int nrxbufs; 53112790Smdodd int ntxbufs; 54112790Smdodd volatile struct ie_int_sys_conf_ptr *iscp; 55112790Smdodd volatile struct ie_sys_ctl_block *scb; 56112790Smdodd volatile struct ie_recv_frame_desc **rframes; /* nframes worth */ 57112790Smdodd volatile struct ie_recv_buf_desc **rbuffs; /* nrxbufs worth */ 58112790Smdodd volatile u_char **cbuffs; /* nrxbufs worth */ 59112790Smdodd int rfhead, rftail, rbhead, rbtail; 60112790Smdodd 61112790Smdodd volatile struct ie_xmit_cmd **xmit_cmds; /* ntxbufs worth */ 62112790Smdodd volatile struct ie_xmit_buf **xmit_buffs; /* ntxbufs worth */ 63112790Smdodd volatile u_char **xmit_cbuffs; /* ntxbufs worth */ 64112790Smdodd int xmit_count; 65112790Smdodd 66112790Smdodd struct ie_en_addr mcast_addrs[MAXMCAST + 1]; 67112790Smdodd int mcast_count; 68112790Smdodd 69112790Smdodd u_short irq_encoded; /* encoded interrupt on IEE16 */ 70112790Smdodd}; 71112790Smdodd#define PORT(sc) sc->port 72112790Smdodd#define MEM(sc) sc->iomem 73112790Smdodd 74112790Smdoddvoid ie_intr (void *); 75112790Smdoddint ie_alloc_resources (device_t); 76112790Smdoddvoid ie_release_resources (device_t); 77112790Smdoddint ie_attach (device_t); 78112790Smdoddint ie_detach (device_t); 79112790Smdodd 80112790Smdoddvoid el_reset_586 (struct ie_softc *); 81112790Smdoddvoid el_chan_attn (struct ie_softc *); 82112790Smdodd 83112790Smdoddvoid sl_reset_586 (struct ie_softc *); 84112790Smdoddvoid sl_chan_attn (struct ie_softc *); 85112790Smdodd 86112790Smdoddvoid ee16_reset_586 (struct ie_softc *); 87112790Smdoddvoid ee16_chan_attn (struct ie_softc *); 88112790Smdodd 89112790Smdoddvoid sl_read_ether (struct ie_softc *, unsigned char *); 90112790Smdoddint check_ie_present (struct ie_softc *); 91112790Smdodd 92