2 * Ctlr for the boards using the National Semiconductor DP8390
3 * and SMC 83C90 Network Interface Controller.
4 * Common code is in ether8390.c.
9 ulong port; /* I/O address of 8390 */
10 ulong data; /* I/O data port if no shared memory */
12 uchar width; /* data transfer width in bytes */
13 uchar ram; /* true if card has shared memory */
14 uchar dummyrr; /* do dummy remote read */
16 uchar nxtpkt; /* receive: software bndry */
20 int txbusy; /* transmit */
21 uchar tstart; /* 8390 ring addresses */
23 uchar mar[8]; /* shadow multicast address registers */
24 int mref[64]; /* reference counts for multicast groups */
27 #define Dp8390BufSz 256
29 extern int dp8390reset(Ether*);
30 extern void *dp8390read(Dp8390*, void*, ulong, ulong);
31 extern void dp8390getea(Ether*, uchar*);
32 extern void dp8390setea(Ether*);
37 #define regr(c, r) inb((c)->port+(r))
38 #define regw(c, r, v) outb((c)->port+(r), (v))
41 rdread(Dp8390* ctlr, void* to, int len)
45 panic("dp8390 rdread: width %d\n", ctlr->width);
49 inss(ctlr->data, to, len/2);
53 insb(ctlr->data, to, len);
59 rdwrite(Dp8390* ctlr, void* from, int len)
63 panic("dp8390 rdwrite: width %d\n", ctlr->width);
67 outss(ctlr->data, from, len/2);
71 outsb(ctlr->data, from, len);