#!/bin/rc # # command: /bin/boddle /n/juke/plan_9/sys/src/9/pc /sys/lib/pcdist/9/pc # srcdir: /n/juke/plan_9/sys/src/9/pc # version: 810873946 # date: Mon Sep 11 22:45:46 EDT 1995 # myname=$0 doextract=no fn usage{ echo $myname: usage: $myname '[-X] [src-directory]' >[1=2] exit usage } fn sigint{ rm -rf 810873946 exit interrupt } while(~ $1 -*){ switch($1){ case -X doextract=yes case -* usage } shift } switch($#*){ case 0 srcdir=/sys/src/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 810873946 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 810873946 mkdir 810873946 target=810873946/adaptec.c echo -n '810873946/adaptec.c: ' if(! test -f $srcdir/adaptec.c || ! test -r $srcdir/adaptec.c){ echo $srcdir/adaptec.c unreadable exit unreadable } sum=`{sum < $srcdir/adaptec.c} if(! ~ 83c1b40114270 $sum(1)^$sum(2)){ echo $srcdir/adaptec.c is not the original distribution file exit original } cp $srcdir/adaptec.c 810873946/adaptec.c ed 810873946/adaptec.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM adaptec.c' 521,527c if(issuepollcmd(ctlr) == 0){ . 510a * If the BIOS is enabled on the 1542C/CF and BIOS options for support of drives * > 1Gb, dynamic scanning of the SCSI bus or more than 2 drives under DOS 5.0 are * enabled, the BIOS disables accepting Cmbinit to protect against running with * drivers which don't support those options. In order to unlock the interface * it is necessary to read a lock-code using Cextbios and write it back using * Cmbienable; the lock-code is non-zero. */ ctlr->cmd[0] = Cinquiry; ctlr->cmdlen = 1; ctlr->datalen = 4; issuepollcmd(ctlr); if(ctlr->data[0] > 0x43){ ctlr->cmd[0] = Cextbios; ctlr->cmdlen = 1; ctlr->datalen = 2; issuepollcmd(ctlr); /* * Lock-code returned in data[1]. If it's non-zero write it back * along with bit 0 of byte 0 cleared to enable mailbox initialisation. */ if(ctlr->data[1]){ ctlr->cmd[0] = Cmbienable; ctlr->cmd[1] = 0; ctlr->cmd[2] = ctlr->data[1]; ctlr->cmdlen = 3; ctlr->datalen = 0; issuepollcmd(ctlr); } } /* . 484d 477a static int issuepollcmd(Ctlr *ctlr) { ulong s; uchar rif, rs; s = splhi(); issue(ctlr); while(((rif = inb(ctlr->port+Rif)) & Hacc) == 0) ; rs = inb(ctlr->port+Rs); outb(ctlr->port+Rc, Irst); if((rif & Hacc) && (rs & Invdcmd)){ splx(s); print("adaptec%d: invdcmd #%2.2ux, len %d\n", 0, ctlr->cmd[0], ctlr->cmdlen); return 0; } splx(s); return 1; } . 76a Cextbios = 0x28, /* return extended BIOS information */ Cmbienable = 0x29, /* set mailbox interface enable */ . wq //GO.SYSIN DD VADIM adaptec.c sum=`{sum < 810873946/adaptec.c} if(~ 0c17c09015603 $sum(1)^$sum(2)) echo if not{ echo 810873946/adaptec.c checksum error creating updated file exit checksum } target=810873946/dat.h echo -n '810873946/dat.h: ' if(! test -f $srcdir/dat.h || ! test -r $srcdir/dat.h){ echo $srcdir/dat.h unreadable exit unreadable } sum=`{sum < $srcdir/dat.h} if(! ~ 7e2e1d678666 $sum(1)^$sum(2)){ echo $srcdir/dat.h is not the original distribution file exit original } cp $srcdir/dat.h 810873946/dat.h ed 810873946/dat.h >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM dat.h' 391a Cmdexec= 1<<6, /* status 1 byte */ Overrun= 0x10, . wq //GO.SYSIN DD VADIM dat.h sum=`{sum < 810873946/dat.h} if(~ 3e416e4b8720 $sum(1)^$sum(2)) echo if not{ echo 810873946/dat.h checksum error creating updated file exit checksum } target=810873946/devata.c echo -n '810873946/devata.c: ' if(! test -f $srcdir/devata.c || ! test -r $srcdir/devata.c){ echo $srcdir/devata.c unreadable exit unreadable } sum=`{sum < $srcdir/devata.c} if(! ~ 8ac981f022873 $sum(1)^$sum(2)){ echo $srcdir/devata.c is not the original distribution file exit original } cp $srcdir/devata.c 810873946/devata.c ed 810873946/devata.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM devata.c' 1111c cp->status |= Serr; break; . 1108,1109c if(++loop > Maxloop){ print("ataintr: read/ident cmd=%lux status=%lux\n", . 1091,1092d 1088,1089c if(++loop > Maxloop) panic("ataintr: write cmd=%lux status=%lux\n", . 1071,1072d 1068,1069c if(++loop > Maxloop) panic("ataintr: wait busy cmd=%lux status=%lux", . 1041c Maxloop= 1000000, . 819a cp->buf = buf; . 763c dp->sectors = lbasecs; . 761c lbasecs = (ip->lbasecs[0]) | (ip->lbasecs[1]<<16); if((ip->capabilities & (1<<9)) && (lbasecs & 0xf0000000) == 0){ . 718a ulong lbasecs; . 553a /*print("ataxfer cyl %d sec %d head %d\n", cyl, sec, head);/**/ . wq //GO.SYSIN DD VADIM devata.c sum=`{sum < 810873946/devata.c} if(~ d1fb09dd22998 $sum(1)^$sum(2)) echo if not{ echo 810873946/devata.c checksum error creating updated file exit checksum } target=810873946/devi82365.c echo -n '810873946/devi82365.c: ' if(! test -f $srcdir/devi82365.c || ! test -r $srcdir/devi82365.c){ echo $srcdir/devi82365.c unreadable exit unreadable } sum=`{sum < $srcdir/devi82365.c} if(! ~ ee2c456424234 $sum(1)^$sum(2)){ echo $srcdir/devi82365.c is not the original distribution file exit original } cp $srcdir/devi82365.c 810873946/devi82365.c ed 810873946/devi82365.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM devi82365.c' 950c if((ct->irqtype & 0x20)) . wq //GO.SYSIN DD VADIM devi82365.c sum=`{sum < 810873946/devi82365.c} if(~ c7551da024191 $sum(1)^$sum(2)) echo if not{ echo 810873946/devi82365.c checksum error creating updated file exit checksum } target=810873946/ether509.c echo -n '810873946/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 810873946/ether509.c ed 810873946/ether509.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM ether509.c' 535,541d 320,340d 308,318c if(status & AllIntr) panic("ether509 interrupt: #%lux, #%ux\n", status, getdiag(ctlr)); . 303,306c * Panic if there are any interrupt bits on we haven't * dealt with. . 291,301c wakeup(&ctlr->tr); status &= ~(TxAvailable|TxComplete); } . 288,289c if(status & TxComplete){ /* * Pop the TX Status stack, accumulating errors. * If there was a Jabber or Underrun error, reset * the transmitter. For all conditions enable * the transmitter. */ txstatus = 0; do{ if(x = inb(port+TxStatus)) outb(port+TxStatus, 0); txstatus |= x; }while(ins(port+Status) & TxComplete); if(txstatus & (TxJabber|TxUnderrun)) COMMAND(port, TxReset, 0); COMMAND(port, TxEnable, 0); ctlr->oerrs++; } if(status & (TxAvailable|TxComplete)){ /* * Reset the Tx FIFO threshold. */ if(status & TxAvailable) COMMAND(port, AckIntr, TxAvailable); . 283,286c if(status & RxComplete){ receive(ctlr); wakeup(&ctlr->rr); status &= ~RxComplete; . 276,281c COMMAND(port, AckIntr, Latch); status = ins(port+Status); if((status & AllIntr) == 0) break; if(status & Failure){ /* * Adapter failure, try to find out why. * Reset if necessary. * What happens if Tx is active and we reset, * need to retransmit? * This probably isn't right. */ diag = getdiag(ctlr); print("ether509: status #%ux, diag #%ux\n", status, diag); if(diag & TxOverrun){ COMMAND(port, TxReset, 0); COMMAND(port, TxEnable, 0); } if(diag & RxUnderrun){ COMMAND(port, RxReset, 0); attach(ctlr); } if(diag & TxOverrun) transmit(ctlr); return; . 270,274c * Clear the interrupt latch. * It's possible to receive a packet and for another * to become complete before we exit the interrupt * handler so this must be done first to ensure another * interrupt will occur. . 268c for(;;){ . 266d 239c outsl(port+Fifo, tb->pkt, (len/4)); . wq //GO.SYSIN DD VADIM ether509.c sum=`{sum < 810873946/ether509.c} if(~ e5a159cd15167 $sum(1)^$sum(2)) echo if not{ echo 810873946/ether509.c checksum error creating updated file exit checksum } target=810873946/kbd.c echo -n '810873946/kbd.c: ' if(! test -f $srcdir/kbd.c || ! test -r $srcdir/kbd.c){ echo $srcdir/kbd.c unreadable exit unreadable } sum=`{sum < $srcdir/kbd.c} if(! ~ 35efc61811837 $sum(1)^$sum(2)){ echo $srcdir/kbd.c is not the original distribution file exit original } cp $srcdir/kbd.c 810873946/kbd.c ed 810873946/kbd.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM kbd.c' 276c ccc |= Csf | Ckbdint | Cscs1 | Cmousedis; . wq //GO.SYSIN DD VADIM kbd.c sum=`{sum < 810873946/kbd.c} if(~ bc90192211849 $sum(1)^$sum(2)) echo if not{ echo 810873946/kbd.c checksum error creating updated file exit checksum } target=810873946/mem.h echo -n '810873946/mem.h: ' if(! test -f $srcdir/mem.h || ! test -r $srcdir/mem.h){ echo $srcdir/mem.h unreadable exit unreadable } sum=`{sum < $srcdir/mem.h} if(! ~ d0434be13638 $sum(1)^$sum(2)){ echo $srcdir/mem.h is not the original distribution file exit original } cp $srcdir/mem.h 810873946/mem.h ed 810873946/mem.h >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM mem.h' 46c #define KTZERO 0x80100000 /* first address in kernel text */ . wq //GO.SYSIN DD VADIM mem.h sum=`{sum < 810873946/mem.h} if(~ 24aa9d983642 $sum(1)^$sum(2)) echo if not{ echo 810873946/mem.h checksum error creating updated file exit checksum } target=810873946/vgatvp3020.c echo -n '810873946/vgatvp3020.c: ' if(! test -f $srcdir/vgatvp3020.c || ! test -r $srcdir/vgatvp3020.c){ echo $srcdir/vgatvp3020.c unreadable exit unreadable } sum=`{sum < $srcdir/vgatvp3020.c} if(! ~ 2449049b5422 $sum(1)^$sum(2)){ echo $srcdir/vgatvp3020.c is not the original distribution file exit original } cp $srcdir/vgatvp3020.c 810873946/vgatvp3020.c ed 810873946/vgatvp3020.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM vgatvp3020.c' 193,195c tvp3020xo(0x20, 0xFF); tvp3020xo(0x21, 0xFF); tvp3020xo(0x22, 0xFF); tvp3020xo(0x23, 0xFF); tvp3020xo(0x24, 0xFF); tvp3020xo(0x25, 0xFF); tvp3020xo(0x26, 0x00); tvp3020xo(0x27, 0x00); tvp3020xo(0x28, 0x00); . wq //GO.SYSIN DD VADIM vgatvp3020.c sum=`{sum < 810873946/vgatvp3020.c} if(~ d9a694235422 $sum(1)^$sum(2)) echo if not{ echo 810873946/vgatvp3020.c checksum error creating updated file exit checksum }