#!/bin/rc # # command: /bin/boddle /usr/rsc/plan9/cd/9/pc . # srcdir: /usr/rsc/plan9/cd/9/pc # version: 898310642 # date: Sat Jun 20 02:44:02 GMT 1998 # myname=$0 doextract=no fn usage{ echo $myname: usage: $myname '[-X] [src-directory]' >[1=2] exit usage } fn sigint{ rm -rf 898310642 exit interrupt } while(~ $1 -*){ switch($1){ case -X doextract=yes case -* usage } shift } switch($#*){ case 0 srcdir=/usr/rsc/plan9/cd/9/pc case 1 srcdir=$1 case * usage } if(! ~ $doextract yes){ echo This shell file contains a bundle of diffs representing changes echo to original source files in the Plan 9 distribution. It will run echo against the files in echo ' ' $srcdir echo '(unless overridden by the optional source directory argument)' echo and create a directory 898310642 containing the updated files. echo It will NOT automatically update the original files. echo echo Invoke with argument -X to perform the actual extraction. exit 0 } rm -rf 898310642 mkdir 898310642 target=898310642/devether.c echo -n '898310642/devether.c: ' if(! test -f $srcdir/devether.c || ! test -r $srcdir/devether.c){ echo $srcdir/devether.c unreadable exit unreadable } sum=`{sum < $srcdir/devether.c} if(! ~ 53e47d4e11859 $sum(1)^$sum(2)){ echo $srcdir/devether.c is not the original distribution file exit original } cp $srcdir/devether.c 898310642/devether.c ed 898310642/devether.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM devether.c' 644a . 643c c = devattach('l', spec); c->dev = i; return c; . 636,641c */ softctlr[i].card.attach(&softctlr[i]); if(softctlr[i].kproc == 0){ sprint(softctlr[i].name, "ether%dkproc", i); softctlr[i].kproc = 1; kproc(softctlr[i].name, etherkproc, &softctlr[i]); . 631a } . 630c i = atoi(spec); if (i < 0 || i >= NCARDS || softctlr[i].present == 0) { . 628c int i; Chan *c; . 619,622c softctlr[j].th = 0; softctlr[j].ti = 0; for(i = 0; i < softctlr[j].ntb; i++) softctlr[j].tb[i].owner = Host; } . 614,617c softctlr[j].rh = 0; softctlr[j].ri = 0; for(i = 0; i < softctlr[j].nrb; i++) softctlr[j].rb[i].owner = Interface; . 611,612c for (j = 0; j < NCARDS; ++j) { if(softctlr[j].present == 0) continue; . 608,609c int i, j; . 601d 598,599c reset(&softctlr[i]); break; . 592,595c softctlr[i].ctlrno, softctlr[i].card.type, softctlr[i].card.port, softctlr[i].card.irq, softctlr[i].card.mem, softctlr[i].card.size, softctlr[i].card.bit16 ? 16: 8); for(n = 0; n < sizeof(softctlr[i].ea); n++) print("%2.2ux", softctlr[i].ea[n]); . 587,589c if(softctlr[i].card.irq == 2) softctlr[i].card.irq = 9; setvec(Int0vec + softctlr[i].card.irq, softctlr[i].card.intr, &softctlr[i]); . 580,581c softctlr[i].present = 1; . 575,577c softctlr[i].ctlrno = i; memmove(softctlr[i].ea, softctlr[i].card.ea, sizeof(softctlr[i].ea)); if((*cards[n].reset)(&softctlr[i])) . 573c if(strcmp(cards[n].type, softctlr[i].card.type)) . 565,571c for(i = 0; memset(&softctlr[i], 0, sizeof(Ctlr)), i < NCARDS && isaconfig("ether", i, &softctlr[i].card); i++){ . 562,563c int i, n; . 552,553c if(ncard == NCARDTYPES) panic("too many ether card types"); . 545c } cards[NCARDTYPES]; . 541c #define NCARDTYPES 8 . 522c ctlr->net.devp = xalloc(sizeof(Qinfo)); ctlr->net.devp->iput = nullput; ctlr->net.devp->oput = etheroput; ctlr->net.devp->open = etherstopen; ctlr->net.devp->close = etherstclose; ctlr->net.devp->name = ctlr->net.name; . 519,520c ctlr->net.name = xalloc(NAMELEN); sprint(ctlr->net.name, "ether%d", ctlr->ctlrno); . 498,506d 374c type = &softctlr[c->dev].type[STREAMID(c->qid.path)]; . 359c ctlr = &softctlr[c->dev]; . 356c Ctlr *ctlr; . 336c ctlr = &softctlr[c->dev]; . 333c Ctlr *ctlr; . 322,329d 255a ctlr = &softctlr[s->dev]; . 253c Ctlr *ctlr; . 198c tsleep(&ctlr->tr, isobuf, ctlr, 1000); . 85c netwstat(c, dp, &softctlr[c->dev].net); . 65c return netread(c, a, n, offset, &softctlr[c->dev].net); . 45c return netopen(c, omode, &softctlr[c->dev].net); . 39c netstat(c, dp, &softctlr[c->dev].net); . 33c return netwalk(c, name, &softctlr[c->dev].net); . 22c #define NCARDS 4 struct Ctlr softctlr[NCARDS]; . wq //GO.SYSIN DD VADIM devether.c sum=`{sum < 898310642/devether.c} if(~ b923bfc412219 $sum(1)^$sum(2)) echo if not{ echo 898310642/devether.c checksum error creating updated file exit checksum } target=898310642/ether.h echo -n '898310642/ether.h: ' if(! test -f $srcdir/ether.h || ! test -r $srcdir/ether.h){ echo $srcdir/ether.h unreadable exit unreadable } sum=`{sum < $srcdir/ether.h} if(! ~ 484a37164461 $sum(1)^$sum(2)){ echo $srcdir/ether.h is not the original distribution file exit original } cp $srcdir/ether.h 898310642/ether.h ed 898310642/ether.h >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM ether.h' 178a . 153c extern void dp8390intr(Ureg*, void*); . 77c NType = 6, /* types/card */ . 54,55c Nrb = 32, /* default number of receive buffers */ Ntb = 32, /* default number of transmit buffers */ . 37a uchar dummyrr; /* do dummy remote read */ . 25c void (*intr)(Ureg*, void*); . wq //GO.SYSIN DD VADIM ether.h sum=`{sum < 898310642/ether.h} if(~ 68d938ec4521 $sum(1)^$sum(2)) echo if not{ echo 898310642/ether.h checksum error creating updated file exit checksum } target=898310642/ether2000.c echo -n '898310642/ether2000.c: ' if(! test -f $srcdir/ether2000.c || ! test -r $srcdir/ether2000.c){ echo $srcdir/ether2000.c unreadable exit unreadable } sum=`{sum < $srcdir/ether2000.c} if(! ~ 8da35f812864 $sum(1)^$sum(2)){ echo $srcdir/ether2000.c is not the original distribution file exit original } cp $srcdir/ether2000.c 898310642/ether2000.c ed 898310642/ether2000.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM ether2000.c' 108a . 73a delay(2); . 66a ctlr->card.dummyrr = 1; for(i = 0; i < ctlr->card.nopt; i++){ if(strcmp(ctlr->card.opt[i], "nodummyrr")) continue; ctlr->card.dummyrr = 0; break; } . 25c Reset = 0x1F, /* offset from I/O base of reset port */ . wq //GO.SYSIN DD VADIM ether2000.c sum=`{sum < 898310642/ether2000.c} if(~ fb6b63e13037 $sum(1)^$sum(2)) echo if not{ echo 898310642/ether2000.c checksum error creating updated file exit checksum } target=898310642/ether509.c echo -n '898310642/ether509.c: ' if(! test -f $srcdir/ether509.c || ! test -r $srcdir/ether509.c){ echo $srcdir/ether509.c unreadable exit unreadable } sum=`{sum < $srcdir/ether509.c} if(! ~ f15af29014924 $sum(1)^$sum(2)){ echo $srcdir/ether509.c is not the original distribution file exit original } cp $srcdir/ether509.c 898310642/ether509.c ed 898310642/ether509.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM ether509.c' 666a . 654d 651a ctlr->card.port = port; . 647,648d 644,645d 639,642c COMMAND(port, SelectWindow, 5); acr = ins(port+TxAvailThresh); COMMAND(port, SetTxAvailThresh, 1800); switch (i = ins(port+TxAvailThresh)) { case 1800: ctlr->card.ram = 0; break; case 7200: ctlr->card.ram = 2; break; default: panic("3c509 @0x%x TxAvailThresh %d", port, i); break; } COMMAND(port, SetTxAvailThresh, acr >> ctlr->card.ram); . 628a case Xcvr100BaseTX: /* * Enable Link Beat to start the * transceiver. */ outs(port+MediaStatus, LinkBeatEna); break; . 625,626c outs(port+MediaStatus, LinkBeatEna|JabberEna); . 618c switch(acr & XcvrTypeMask) { . 614a COMMAND(port, SelectWindow, 4); . 613a } . 612c for(i = 0; i < Eaddrlen; i++) { . 610a } . 609c if((ctlr->ea[0]|ctlr->ea[1]|ctlr->ea[2]|ctlr->ea[3]|ctlr->ea[4]|ctlr->ea[5]) == 0) { . 606,607d 602a case Xcvr10t: acr = Xcvr10BaseT; break; case Xcvr10b: acr = XcvrBNC; break; case Xcvr100t: acr = Xcvr100BaseTX; break; } free(pcicfg); } else { acr = ins(port+AddressConfig); } . 601c if(pcicfg) { ctlr->card.irq = pcicfg->irq; COMMAND(port, SelectWindow, 3); outl(port+InternalCfg, (inl(port+InternalCfg) & ~RAMPart) | RAM31); acr = XcvrAUI; switch(inl(port+InternalCfg) & XcvrSel) { . 592,599c while(ins(port+EEPROMcmd) & EEPROMbusy); outs(port+EEPROMcmd, 0x80|i); while(ins(port+EEPROMcmd) & EEPROMbusy); acr = ins(port+EEPROMdata); ea[eax] = (acr>>8) & 0xFF; ea[eax+1] = acr & 0xFF; . 590a } /* * If is 3C562, don't bother trying to get * ether addr off of EEPROM; it's not there. * Should try to get from PCMCIA memory space. */ if(strcmp(ctlr->card.type, "3C562") != 0) . 589c if(!pcicfg && strcmp(ctlr->card.type, "3C589") && strcmp(ctlr->card.type, "3C562")) { . 580a port = cm509(&ctlr->card); if(port == 0) . 579c port = cm579(&ctlr->card); . 577c port = cm589(&ctlr->card); . 574,575c if(port == 0 && (pcicfg = cm590(&ctlr->card))) port = pcicfg->baseaddr[0] & ~0x01; . 570c free(ap); . 565a pcicfg = 0; . 555a PCIcfg *pcicfg; . 553c ushort acr; . 541c if(strcmp(isa->type, "3C589") != 0 && strcmp(isa->type, "3C562") != 0) return 0; /* * The 3com manual register description says that this a noop for * PCMCIA but the flow chart at the end shows it. * * COMMAND(isa->port, SelectWindow, 0); * outs(isa->port+ConfigControl, Ena); */ return isa->port; } static PCIcfg* cm590(ISAConf *isa) { PCIcfg pcicfg, *pcicfgp; static int devno = 0; ulong port; Adapter *ap; memset(&pcicfg, 0, sizeof(PCIcfg)); for(;;){ pcicfg.vid = 0x10B7; pcicfg.did = 0; if((devno = pcimatch(0, devno, &pcicfg)) == -1) { break; } port = pcicfg.baseaddr[0] & ~0x01; COMMAND(port, GlobalReset, 0); while(ins(port+Status) & CmdInProgress); if(isa->port == 0 || isa->port == port) { /* pcicfgr(0, devno-1, 0, 0, &pcicfg, sizeof(PCIcfg)); pcicfg.command |= 0x0004; pcicfg.latency = 0xff; pcicfgw(0, devno-1, 0, 0x04, &pcicfg.command, 12);*/ pcicfgp = malloc(sizeof(PCIcfg)); memmove(pcicfgp, &pcicfg, sizeof(PCIcfg)); return pcicfgp; } ap = malloc(sizeof(Adapter)); ap->pcicfg = malloc(sizeof(PCIcfg)); memmove(ap->pcicfg, &pcicfg, sizeof(PCIcfg)); ap->port = port; ap->next = adapter; adapter = ap; memset(&pcicfg, 0, sizeof(PCIcfg)); } . 539c cm589(ISAConf *isa) . 524c while(ins(port+Status) & CmdInProgress); COMMAND(port, AckIntr, AllIntr|Latch); . 522a while(ins(port+Status) & CmdInProgress); . 511c while(slot < MaxEISA){ . 489c cm579(ISAConf *isa) . 474c print("cm509: activate\n"); . 441c cm509(ISAConf *isa) . 346a PCIcfg* pcicfg; . 331,339d 325,329c diag = getdiag(ctlr); print("ether%d: status #%ux, diag #%ux\n", ctlr->ctlrno, status, diag); if(diag & RxUnderrun){ attach(ctlr); } if(diag & TxOverrun) { if(!(diag & RxUnderrun)) { COMMAND(port, TxReset, 0); while(ins(port+Status) & CmdInProgress); COMMAND(port, TxEnable, 0); } if(ctlr->tb[ctlr->ti].owner == Interface) { ctlr->tbusy = 0; transmit(ctlr); if(ctlr->tb[ctlr->th].owner == Host) { wakeup(&ctlr->tr); } } } . 323c * Adapter failure, try to find out why. * Reset if necessary. . 320,321c if(status & Failure){ . 318c if(ctlr->tb[ctlr->ti].owner == Interface) { ctlr->tbusy = 0; transmit(ctlr); if(ctlr->tb[ctlr->th].owner == Host) { wakeup(&ctlr->tr); } } . 315,316c if(txstatus & (TxJabber|TxUnderrun|TxMaxColl)) { if(txstatus & (TxJabber|TxUnderrun)) { COMMAND(port, TxReset, 0); while(ins(port+Status) & CmdInProgress); } ctlr->oerrs++; } . 300c if(status & TxAvailable) { COMMAND(port, AckIntr, TxAvailable); ctlr->tbusy = 0; transmit(ctlr); if(ctlr->tb[ctlr->th].owner == Host) { wakeup(&ctlr->tr); } } . 297,298c if(ctlr->rb[ctlr->rh].owner == Host) { wakeup(&ctlr->rr); } . 294d 266,291c if(!((status = ins(port+Status)) & AllIntr)) { COMMAND(port, AckIntr, Latch); . 264a USED(ur); . 259c interrupt(Ureg *ur, Ctlr *ctlr) . 245,257d 241a if(ins(port+RxStatus) & RxByteMask) { if(!ctlr->tbusy++) { COMMAND(port, SetTxAvailThresh, ETHERMAXTU >> ctlr->card.ram); } break; } . 237,238c outl(port+Fifo, tb->len); . 232d 228,229c if(len+4 > ins(port+TxFreeBytes)) { /*print("F");*/ if(!ctlr->tbusy++) { COMMAND(port, SetTxAvailThresh, ETHERMAXTU >> ctlr->card.ram); } . 207,208c while(ins(port+Status) & CmdInProgress); . 201d 198a } else { print("D"); . 192,196c insl(port+Fifo, rb->pkt, HOWMANY(rb->len, 4)); . 184,186c rb->len = (status & RxByteMask); . 175,176c } else { . 170d 162d 157,158c print("O"); switch(status & RxErrMask) { . 151c while(!((status = ins(port+RxStatus)) & RxEmpty)) { . 147d 127a COMMAND(port, RxEnable, 0); splx(x); . 124,126d 115,122c x = splhi(); COMMAND(port, TxReset, 0); while(ins(port+Status) & CmdInProgress); COMMAND(port, RxReset, 0); while(ins(port+Status) & CmdInProgress); COMMAND(port, SelectWindow, 2); for(i = 0; i < Eaddrlen; i++) { outb(port+i, ctlr->ea[i]); } COMMAND(port, SelectWindow, 1); COMMAND(port, AckIntr, 0x0FFF); COMMAND(port, SetIndicationEnable, AllIntr|Latch); COMMAND(port, SetIntrEnable, AllIntr|Latch); . 112c ulong port, x; int i; . 108a static ushort getdiag(Ctlr *ctlr) { ushort bytes; ulong port; port = ctlr->card.port; COMMAND(port, SelectWindow, 4); print("ether%d: TxDiag #%ux\n", ctlr->ctlrno, ins(port+TxDiag)); print("ether%d: HostDiag #%ux\n", ctlr->ctlrno, ins(port+HostDiag)); print("ether%d: NetDiag #%ux\n", ctlr->ctlrno, ins(port+NetDiag)); print("ether%d: EthDiag #%ux\n", ctlr->ctlrno, ins(port+EthDiag)); print("ether%d: MediaStatus #%ux\n", ctlr->ctlrno, ins(port+MediaStatus)); bytes = ins(port+FIFOdiag); COMMAND(port, SelectWindow, 1); return bytes & 0xFFFF; } . 107c #define COMMAND(port, cmd, a) outs(port+CommandR, ((cmd)<<11)|(a)) . 102,104c /* MediaStatus bits */ DataRate100 = 0x0002, CrcStripDisable = 0x0004, EnableSqeStats = 0x0008, CollisionDetect = 0x0010, CarrierSense = 0x0020, JabberEna = 0x0040, /* Jabber Enabled (writeable) */ LinkBeatEna = 0x0080, /* Link Beat Enabled (writeable) */ JabberDetect = 0x0200, PolarityReverse = 0x0400, LinkBeatDetect = 0x0800, TxInProg = 0x1000, DcConvertEna = 0x4000, AuiDisable = 0x8000, TxStartThresh = 0x00, /* window 5 */ TxAvailThresh = 0x02, RxEarlyThresh = 0x06, MasterAddress = 0x00, /* window 7 */ MasterLen = 0x06, MasterStatus = 0x0C, /* MasterStatus bits */ MasterInProgress = 0x8000, DmaUpload = 0x4000, DmaDownload = 0x1000, DmaDisc = 0x0008, DmaRetry = 0x0004, DmaTargetAbort = 0x0002, DmaMasterAbort = 0x0001, DmaMask = 0x500F, . 95,100c /* FIFOdiag bits */ TxOverrun = 0x0400, /* TX Overrrun */ RxOverrun = 0x0800, /* RX Overrun */ RxStatOverrun = 0x1000, /* RX Status Overrun */ RxUnderrun = 0x2000, /* RX Underrun */ RxReceiving = 0x8000, /* RX Receiving */ . 92c InternalCfg = 0x00, /* window 3 */ MacControl = 0x06, ResetOptions = 0x08, /* InternalCfg bits */ RAMSize = 0x00000007, RAMWid = 0x00000008, RAM53 = 0x00000000, RAM31 = 0x00010000, RAM11 = 0x00020000, RAM35 = 0x00030000, RAMPart = 0x00030000, Xcvr10t = 0x00000000, Xcvr10a = 0x00100000, Xcvr10b = 0x00300000, Xcvr100t = 0x00400000, Xcvr100f = 0x00500000, Xcvrmii = 0x00600000, XcvrSel = 0x00700000, AutoSel = 0x01000000, /* MacControl bits */ DeferExtendEnable = 0x0001, DeferTimerSelect = 0x001e, FullDuplexEnable = 0x0020, AllowLargePackets = 0x0040, /* ResetOptions bits */ BaseT4Avail = 0x0001, BaseTXAvail = 0x0002, BaseFXAvail = 0x0004, Base10bTAvail = 0x0008, CoaxAvail = 0x0010, AuiAvail = 0x0020, MiiAvail = 0x0040, VcoAvail = 0x0100, ForcedConfig = 0x1000, TestMode = 0xE000, TxDiag = 0x00, /* window 4 */ HostDiag = 0x02, FIFOdiag = 0x04, NetDiag = 0x06, EthDiag = 0x08, . 80,90c /* RxStatus Bits */ RxByteMask = 0x07FF, /* RX Bytes (0-1514) */ RxErrMask = 0x3800, /* Type of Error: */ RxErrOverrun = 0x0000, /* Overrrun */ RxErrOversize = 0x0800, /* Oversize Packet (>1514) */ RxErrDribble = 0x1000, /* Dribble Bit(s) */ RxErrRunt = 0x1800, /* Runt Packet */ RxErrFraming = 0x2000, /* Alignment (Framing) */ RxErrCRC = 0x2800, /* CRC */ RxEmpty = 0x8000, /* Incomplete or FIFO empty */ RxError = 0x4000, /* Error */ . 78a TxStatusOver = 0x04, /* TxStatus Overflow */ . 75,76c /* TxStatus Bits */ TxSuccess = 0x40, /* successful trans requested */ TxJabber = 0x20, /* Jabber Error */ . 65,73c /* Status/Interrupt Bits */ Latch = 0x0001, /* Interrupt Latch */ Failure = 0x0002, /* Adapter Failure */ TxComplete = 0x0004, /* TX Complete */ TxAvailable = 0x0008, /* TX Available */ RxComplete = 0x0010, /* RX Complete */ RxEarly = 0x0020, /* RX In progress */ IntRqd = 0x0040, UpdStats = 0x0080, DmaComplete = 0x0100, DmaInProgress = 0x0800, CmdInProgress = 0x1000, /* CommandR In Progress */ AllIntr = 0x001E, /* All interesting Interrupt Bits */ . 59c Fifo = 0x00, /* window 1 */ . 55,57c /* ConfigControl */ Rst = 0x04, /* Reset Adapter */ Ena = 0x01, /* Enable Adapter */ . 49,53c /* AddressConfig Bits */ XcvrTypeMask = 0x1C000, /* Transceiver Type Select */ Xcvr100BaseTX = 0x10000, Xcvr10BaseT = 0x00000, XcvrAUI = 0x04000, XcvrBNC = 0x0C000, . 47a EEPROMbusy = 0x8000, . 41c ManufacturerID = 0x00, /* window 0 */ . 37,38c /* StartDma CommandR bits */ DUpload = 0x00, /* up from FIFO */ DDownload = 0x01, /* Down to FIFO */ /* Window Register Offsets */ CommandR = 0x0E, /* all windows */ . 33,34c Multicast = 0x02, /* Group (multicast) addresses */ Broadcast = 0x04, /* Broadcast address */ . 31c /* GlobalReset CommandR bits */ DmaReset = 0xBF, /* RX Filter CommandR Bits */ . 29c SetRxEarlyThresh = 0x11, /* Set RX Early Threshold */ SetTxAvailThresh = 0x12, /* Set TX Available Threshold */ SetTxStartThresh = 0x13, /* Set TX Start Threshold */ StartDma = 0x14, StatsEnable = 0x15, StatsDisable = 0x16, StopCoax = 0x17, . 26,27c SetIntrEnable = 0x0E, /* Set Interrupt Enable */ SetIndicationEnable = 0x0F, /* Set Indication Enable */ . 24a ReqInt = 0x0C, /* request interrupt */ . 21,23c TxDone = 0x07, RxDiscard = 0x08, /* RX Discard Top Packet */ TxEnable = 0x09, /* TX Enable */ TxDisable = 0x0A, /* TX Disable */ . 17,19c StartCoax = 0x02, /* Start Coaxial Transceiver */ RxDisable = 0x03, /* RX Disable */ RxEnable = 0x04, /* RX Enable */ . 15c /* CommandRs */ GlobalReset = 0x00, /* Global Reset */ . 13c IDport = 0x0110, /* anywhere between 0x0100 and 0x01F0 */ . wq //GO.SYSIN DD VADIM ether509.c sum=`{sum < 898310642/ether509.c} if(~ 59a8dad620155 $sum(1)^$sum(2)) echo if not{ echo 898310642/ether509.c checksum error creating updated file exit checksum } target=898310642/ether8390.c echo -n '898310642/ether8390.c: ' if(! test -f $srcdir/ether8390.c || ! test -r $srcdir/ether8390.c){ echo $srcdir/ether8390.c unreadable exit unreadable } sum=`{sum < $srcdir/ether8390.c} if(! ~ 15cc457216852 $sum(1)^$sum(2)){ echo $srcdir/ether8390.c is not the original distribution file exit original } cp $srcdir/ether8390.c 898310642/ether8390.c ed 898310642/ether8390.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM ether8390.c' 684a . 630c while(isr = (dp8390inb(dp8390+Isr) & (Cnte|Ovwe|Txee|Rxee|Ptxe|Prxe))){ . 623a USED(ur); . 622a Ctlr *ctlr = a; . 618c dp8390intr(Ureg *ur, void *a) . 398a else{ dp8390outb(dp8390+Rsar0, to & 0xFF); dp8390outb(dp8390+Rsar1, (to>>8) & 0xFF); dp8390outb(dp8390+Rbcr0, len & 0xFF); dp8390outb(dp8390+Rbcr1, (len>>8) & 0xFF); dp8390outb(dp8390+Cr, Page0|RDMAwrite|Sta); } . 393,396c if(crda == to){ /* * Start the remote DMA write and make sure * the registers are correct. */ dp8390outb(dp8390+Cr, Page0|RDMAwrite|Sta); crda = dp8390inb(dp8390+Crda0); crda |= dp8390inb(dp8390+Crda1)<<8; if(crda != to) panic("crda write %d to %d\n", crda, to); break; } . 374,390c if(ctlr->card.dummyrr){ crda = to-1-ctlr->card.bit16; dp8390outb(dp8390+Rbcr0, (len+1+ctlr->card.bit16) & 0xFF); dp8390outb(dp8390+Rbcr1, ((len+1+ctlr->card.bit16)>>8) & 0xFF); dp8390outb(dp8390+Rsar0, crda & 0xFF); dp8390outb(dp8390+Rsar1, (crda>>8) & 0xFF); dp8390outb(dp8390+Cr, Page0|RDMAread|Sta); for(;;){ . 372c * the initial set up for read unless told otherwise. . wq //GO.SYSIN DD VADIM ether8390.c sum=`{sum < 898310642/ether8390.c} if(~ 27674c0417224 $sum(1)^$sum(2)) echo if not{ echo 898310642/ether8390.c checksum error creating updated file exit checksum }