|
|
1.1 ! root 1: /* ! 2: * for datakit simple kmc driver ! 3: */ ! 4: ! 5: /* ! 6: * per channel ! 7: */ ! 8: struct kb { ! 9: struct queue *dkrq; ! 10: char flag; ! 11: unsigned char chan; ! 12: struct kb *link; ! 13: }; ! 14: ! 15: /* ! 16: * buffer descriptor ! 17: */ ! 18: struct kbdesc { ! 19: short loaddr; /* low buffer address */ ! 20: short len; /* negative buffer length */ ! 21: unsigned char chan; /* channel */ ! 22: char flag; /* flags and high address */ ! 23: }; ! 24: ! 25: /* ! 26: * per interface ! 27: */ ! 28: ! 29: #define XRING 40 ! 30: #define RRING 20 ! 31: ! 32: struct kbkmc { ! 33: char flags; ! 34: char kno; /* which kmc is ours */ ! 35: char ubno; /* which unibus has the kmc */ ! 36: struct device *addr; /* kmc registers */ ! 37: struct dkmodule *modp; ! 38: struct { /* bundle for convenient unibus mapping */ ! 39: struct kbdesc _xring[XRING+1]; ! 40: struct kbdesc _rring[RRING+1]; ! 41: } rings; ! 42: #define xring rings._xring ! 43: #define rring rings._rring ! 44: ubm_t ringmap; ! 45: uaddr_t xrua, rrua; /* unibus address of descriptor rings */ ! 46: struct block *xblock[XRING]; /* blocks in transmit descriptors */ ! 47: ubm_t xmap[XRING]; /* and their map cookies */ ! 48: struct block *rblock[RRING]; /* likewise receive */ ! 49: ubm_t rmap[RRING]; ! 50: char xrp, xwp; /* read, write positions in xring */ ! 51: char rrp, rwp; /* and in rring */ ! 52: int rbytes; /* bytes of receive buffer outstanding */ ! 53: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.