Browse Source

Plan 9 from Bell Labs 2006-07-13

David du Colombier 17 years ago
parent
commit
f8847c68a6
5 changed files with 25 additions and 29 deletions
  1. 2 2
      dist/replica/_plan9.db
  2. 2 2
      dist/replica/plan9.db
  3. 2 0
      dist/replica/plan9.log
  4. 6 0
      sys/man/8/prep
  5. 13 25
      sys/src/9/pc/usbuhci.c

+ 2 - 2
dist/replica/_plan9.db

@@ -7733,7 +7733,7 @@ sys/man/8/ping - 664 sys sys 1139667147 3489
 sys/man/8/plan9.ini - 664 sys sys 1131294569 22077
 sys/man/8/pop3 - 664 sys sys 1063854676 2720
 sys/man/8/ppp - 664 sys sys 1125530075 4414
-sys/man/8/prep - 664 sys sys 1143568557 13874
+sys/man/8/prep - 664 sys sys 1152729153 14013
 sys/man/8/qer - 664 sys sys 1067723129 4909
 sys/man/8/reboot - 664 sys sys 969499895 414
 sys/man/8/replica - 664 sys sys 1138479158 6383
@@ -8035,7 +8035,7 @@ sys/src/9/pc/uarti8250.c - 664 sys sys 1102820421 13958
 sys/src/9/pc/uartisa.c - 664 sys sys 1127126907 1777
 sys/src/9/pc/uartpci.c - 664 sys sys 1096379063 2891
 sys/src/9/pc/usb.h - 664 sys sys 1099760881 3650
-sys/src/9/pc/usbuhci.c - 664 sys sys 1099760881 30955
+sys/src/9/pc/usbuhci.c - 664 sys sys 1152730364 30793
 sys/src/9/pc/vga.c - 664 sys sys 1131290595 5148
 sys/src/9/pc/vga3dfx.c - 664 sys sys 1133218367 3833
 sys/src/9/pc/vgaark2000pv.c - 664 sys sys 1131290600 3422

+ 2 - 2
dist/replica/plan9.db

@@ -7733,7 +7733,7 @@ sys/man/8/ping - 664 sys sys 1139667147 3489
 sys/man/8/plan9.ini - 664 sys sys 1131294569 22077
 sys/man/8/pop3 - 664 sys sys 1063854676 2720
 sys/man/8/ppp - 664 sys sys 1125530075 4414
-sys/man/8/prep - 664 sys sys 1143568557 13874
+sys/man/8/prep - 664 sys sys 1152729153 14013
 sys/man/8/qer - 664 sys sys 1067723129 4909
 sys/man/8/reboot - 664 sys sys 969499895 414
 sys/man/8/replica - 664 sys sys 1138479158 6383
@@ -8035,7 +8035,7 @@ sys/src/9/pc/uarti8250.c - 664 sys sys 1102820421 13958
 sys/src/9/pc/uartisa.c - 664 sys sys 1127126907 1777
 sys/src/9/pc/uartpci.c - 664 sys sys 1096379063 2891
 sys/src/9/pc/usb.h - 664 sys sys 1099760881 3650
-sys/src/9/pc/usbuhci.c - 664 sys sys 1099760881 30955
+sys/src/9/pc/usbuhci.c - 664 sys sys 1152730364 30793
 sys/src/9/pc/vga.c - 664 sys sys 1131290595 5148
 sys/src/9/pc/vga3dfx.c - 664 sys sys 1133218367 3833
 sys/src/9/pc/vgaark2000pv.c - 664 sys sys 1131290600 3422

+ 2 - 0
dist/replica/plan9.log

@@ -30196,3 +30196,5 @@
 1152225005 0 c sys/src/cmd/auth/cron.c - 664 sys sys 1152222646 12266
 1152225005 1 c sys/src/cmd/auth/lib/mkfile - 664 sys sys 1152223363 386
 1152291604 0 c 386/bin/auth/cron - 775 sys sys 1152291495 144824
+1152730805 0 c sys/man/8/prep - 664 sys sys 1152729153 14013
+1152730805 1 c sys/src/9/pc/usbuhci.c - 664 sys sys 1152730364 30793

+ 6 - 0
sys/man/8/prep

@@ -63,6 +63,7 @@ prep, fdisk, format, mbr \- prepare hard and floppy diskettes, flashes
 .B -m
 .I mbrfile
 ]
+.I disk
 .SH DESCRIPTION
 A partition table is stored on a hard disk to specify the division of
 the physical disk into a set of logical units.
@@ -617,6 +618,11 @@ by older BIOSes), it can access more than the first 8.5GB of the disk.
 installs a new boot block in sector 0 (the master boot record)
 of a disk such as
 .BR /dev/sdC0/data .
+If
+.I mbrfile
+contains more than one sector of `boot block',
+the rest will be copied into the first track of the
+disk, if it fits.
 This boot block should not be confused with the
 boot block used by 
 .IR format ,

+ 13 - 25
sys/src/9/pc/usbuhci.c

@@ -9,6 +9,7 @@
 #include	"usb.h"
 
 #define XPRINT if(debug)print
+#define XXPRINT if(0)print
 
 static int Chatty = 0;
 static int debug = 0;
@@ -1044,22 +1045,22 @@ interrupt(Ureg*, void *a)
 	for(e = ctlr->activends.f; e != nil; e = e->activef) {
 		x = e->private;
 		if(!e->iso && x->epq != nil) {
-			XPRINT("cleanq(ctlr, x->epq, 0, 0)\n");
+			XXPRINT("cleanq(ctlr, x->epq, 0, 0)\n");
 			cleanq(ctlr, x->epq, 0, 0);
 		}
 		if(e->iso) {
-			XPRINT("cleaniso(e)\n");
+			XXPRINT("cleaniso(e)\n");
 			cleaniso(e, frnum);
 		}
 	}
 	iunlock(&ctlr->activends);
-	XPRINT("cleanq(ctlr, ctlr->ctlq, 0, 0)\n");
+	XXPRINT("cleanq(ctlr, ctlr->ctlq, 0, 0)\n");
 	cleanq(ctlr, ctlr->ctlq, 0, 0);
-	XPRINT("cleanq(ctlr, ctlr->bulkq, 0, Vf)\n");
+	XXPRINT("cleanq(ctlr, ctlr->bulkq, 0, Vf)\n");
 	cleanq(ctlr, ctlr->bulkq, 0, Vf);
-	XPRINT("clean recvq\n");
+	XXPRINT("clean recvq\n");
 	for (q = ctlr->recvq->next; q; q = q->hlink) {
-		XPRINT("cleanq(ctlr, q, 0, Vf)\n");
+		XXPRINT("cleanq(ctlr, q, 0, Vf)\n");
 		cleanq(ctlr, q, 0, Vf);
 	}
 }
@@ -1074,26 +1075,13 @@ eptinput(void *arg)
 }
 
 static int
-isoreadyx(Endptx *x)
+isoready(void *a)
 {
-	return x->etd == nil || (x->etd != x->xtd && (x->etd->status & Active) == 0);
-}
-
-static int
-isoready(void *arg)
-{
-	int ret;
-	Ctlr *ctlr;
-	Endpt *e;
 	Endptx *x;
+	TD *etd;
 
-	e = arg;
-	ctlr = e->dev->uh->ctlr;
-	x = e->private;
-	ilock(&ctlr->activends);
-	ret = isoreadyx(x);
-	iunlock(&ctlr->activends);
-	return ret;
+	x = a;
+	return (etd = x->etd) == nil || (etd != x->xtd && (etd->status & Active) == 0);
 }
 
 static long
@@ -1167,10 +1155,10 @@ isoio(Ctlr *ctlr, Endpt *e, void *a, long n, ulong offset, int w)
 				e->off = 0;
 			}else{
 				/* New td, make sure it's ready */
-				while (isoreadyx(x) == 0){
+				while (isoready(x) == 0){
 					isolock = 0;
 					iunlock(&ctlr->activends);
-					sleep(&e->wr, isoready, e);
+					sleep(&e->wr, isoready, x);
 					ilock(&ctlr->activends);
 					isolock = 1;
 				}