Browse Source

Plan 9 from Bell Labs 2008-07-22

David du Colombier 12 years ago
parent
commit
1c87d0bdb3

+ 2 - 2
dist/replica/_plan9.db

@@ -8201,7 +8201,7 @@ sys/src/9/pc/uartaxp.c - 664 sys sys 1207419955 18931
 sys/src/9/pc/uartaxp.i - 664 sys sys 1155243528 111326
 sys/src/9/pc/uarti8250.c - 664 sys sys 1177676872 13957
 sys/src/9/pc/uartisa.c - 664 sys sys 1127126907 1777
-sys/src/9/pc/uartpci.c - 664 sys sys 1190235592 4685
+sys/src/9/pc/uartpci.c - 664 sys sys 1216677181 4912
 sys/src/9/pc/usb.h - 664 sys sys 1202865355 4630
 sys/src/9/pc/usbohci.c - 664 sys sys 1213134352 48372
 sys/src/9/pc/usbuhci.c - 664 sys sys 1202252076 31839
@@ -14141,7 +14141,7 @@ sys/src/cmd/unix/u9fs/safecpy.c - 664 sys sys 1043768486 212
 sys/src/cmd/unix/u9fs/strecpy.c - 664 sys sys 1015092353 193
 sys/src/cmd/unix/u9fs/sun-inttypes.h - 664 sys sys 1039110816 441
 sys/src/cmd/unix/u9fs/tokenize.c - 664 sys sys 1015092353 602
-sys/src/cmd/unix/u9fs/u9fs.c - 664 sys sys 1205963230 31901
+sys/src/cmd/unix/u9fs/u9fs.c - 664 sys sys 1216676473 32015
 sys/src/cmd/unix/u9fs/u9fs.h - 664 sys sys 1043768488 649
 sys/src/cmd/unix/u9fs/u9fsauth.h - 664 sys sys 1015092354 126
 sys/src/cmd/unix/u9fs/utfrune.c - 664 sys sys 1015092354 387

+ 2 - 2
dist/replica/plan9.db

@@ -8201,7 +8201,7 @@ sys/src/9/pc/uartaxp.c - 664 sys sys 1207419955 18931
 sys/src/9/pc/uartaxp.i - 664 sys sys 1155243528 111326
 sys/src/9/pc/uarti8250.c - 664 sys sys 1177676872 13957
 sys/src/9/pc/uartisa.c - 664 sys sys 1127126907 1777
-sys/src/9/pc/uartpci.c - 664 sys sys 1190235592 4685
+sys/src/9/pc/uartpci.c - 664 sys sys 1216677181 4912
 sys/src/9/pc/usb.h - 664 sys sys 1202865355 4630
 sys/src/9/pc/usbohci.c - 664 sys sys 1213134352 48372
 sys/src/9/pc/usbuhci.c - 664 sys sys 1202252076 31839
@@ -14141,7 +14141,7 @@ sys/src/cmd/unix/u9fs/safecpy.c - 664 sys sys 1043768486 212
 sys/src/cmd/unix/u9fs/strecpy.c - 664 sys sys 1015092353 193
 sys/src/cmd/unix/u9fs/sun-inttypes.h - 664 sys sys 1039110816 441
 sys/src/cmd/unix/u9fs/tokenize.c - 664 sys sys 1015092353 602
-sys/src/cmd/unix/u9fs/u9fs.c - 664 sys sys 1205963230 31901
+sys/src/cmd/unix/u9fs/u9fs.c - 664 sys sys 1216676473 32015
 sys/src/cmd/unix/u9fs/u9fs.h - 664 sys sys 1043768488 649
 sys/src/cmd/unix/u9fs/u9fsauth.h - 664 sys sys 1015092354 126
 sys/src/cmd/unix/u9fs/utfrune.c - 664 sys sys 1015092354 387

+ 2 - 0
dist/replica/plan9.log

@@ -20066,3 +20066,5 @@
 1216153804 8 c sys/src/9/ip/devip.c - 664 sys sys 1216152698 24934
 1216153804 9 c sys/src/9/ip/ip.h - 664 sys sys 1216152694 16677
 1216335604 0 c sys/man/1/vnc - 664 sys sys 1216333990 4339
+1216677605 0 c sys/src/9/pc/uartpci.c - 664 sys sys 1216677181 4912
+1216677605 1 c sys/src/cmd/unix/u9fs/u9fs.c - 664 sys sys 1216676473 32015

+ 7 - 0
sys/src/9/pc/uartpci.c

@@ -115,6 +115,7 @@ uartpcipnp(void)
 				continue;
 			break;
 		case (0x950A<<16)|0x1415:	/* Oxford Semi OX16PCI954 */
+		case (0x9501<<16)|0x1415:
 			/*
 			 * These are common devices used by 3rd-party
 			 * manufacturers.
@@ -125,7 +126,13 @@ uartpcipnp(void)
 			subid |= pcicfgr16(p, PciSID)<<16;
 			switch(subid){
 			default:
+				print("oxsemi uart %.8#ux of vid %#ux did %#ux unknown\n",
+					subid, p->vid, p->did);
 				continue;
+			case (0<<16)|0x1415:
+				uart = uartpci(ctlrno, p, 0, 4, 1843200,
+					"starport-pex4s", 8);
+				break;
 			case (0x2000<<16)|0x131F:/* SIIG CyberSerial PCIe */
 				uart = uartpci(ctlrno, p, 0, 1, 18432000,
 					"CyberSerial-1S", 8);

+ 9 - 1
sys/src/cmd/unix/u9fs/u9fs.c

@@ -60,6 +60,7 @@ struct Fid {
 	int diroffset;
 	int fd;
 	struct dirent *dirent;
+	int direof;
 	Fid *next;
 	Fid *prev;
 	int auth;
@@ -739,6 +740,11 @@ rread(Fcall *rx, Fcall *tx)
 			}
 			rewinddir(fid->dir);
 			fid->diroffset = 0;
+			fid->direof = 0;
+		}
+		if(fid->direof){
+			tx->count = 0;
+			return;
 		}
 
 		p = (uchar*)tx->data;
@@ -747,8 +753,10 @@ rread(Fcall *rx, Fcall *tx)
 			if(p+BIT16SZ >= ep)
 				break;
 			if(fid->dirent == nil)	/* one entry cache for when convD2M fails */
-				if((fid->dirent = readdir(fid->dir)) == nil)
+				if((fid->dirent = readdir(fid->dir)) == nil){
+					fid->direof = 1;
 					break;
+				}
 			if(strcmp(fid->dirent->d_name, ".") == 0
 			|| strcmp(fid->dirent->d_name, "..") == 0){
 				fid->dirent = nil;