فهرست منبع

Plan 9 from Bell Labs 2010-12-14

David du Colombier 13 سال پیش
والد
کامیت
3397e41701
2فایلهای تغییر یافته به همراه7 افزوده شده و 1 حذف شده
  1. 1 1
      sys/man/8/dhcpd
  2. 6 0
      sys/src/9/kw/flashkw.c

+ 1 - 1
sys/man/8/dhcpd

@@ -66,7 +66,7 @@ an IP address on the originating network or subnetwork.
 .br
 \- a free dynamic address exists on the originating network or subnetwork.
 .PP
-A BOOTP request is honored it all of the following are true:
+A BOOTP request is honored if all of the following are true:
 .br
 \- there exists an NDB entry
 containing both the ethernet address of the requester and

+ 6 - 0
sys/src/9/kw/flashkw.c

@@ -39,6 +39,8 @@
 enum {
 	Debug		= 0,
 
+	Nopage		= ~0ul,		/* cache is empty */
+
 	/* vendors */
 	Hynix		= 0xad,
 	Samsung		= 0xec,
@@ -355,6 +357,9 @@ erasezone(Flash *f, Flashregion *r, ulong offset)
 	nandaddr(f, page>>16);
 	nandcmd(f, Erasestart);
 
+	/* invalidate cache on any erasure (slight overkill) */
+	cache.pageno = Nopage;
+
 	/* have to wait until flash is done.  typically ~2ms */
 	delay(1);
 	nandcmd(f, Readstatus);
@@ -653,6 +658,7 @@ reset(Flash *f)
 	f->suspend = nil;
 	f->resume = nil;
 	f->sort = "nand";
+	cache.pageno = Nopage;
 	return idchip(f);
 }