git: 9front

Download patch

ref: a83238dfaf0d1272553de893a3df15a2e11dfe21
parent: 867ec3fd565d0bb67808e33005685c5a2104a8e9
parent: 9dcf1a2fc4bab3c7388d11b6863aa855b3deb977
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Jan 7 19:24:55 EST 2018

merge

--- a/sys/src/9/pc/ether8169.c
+++ b/sys/src/9/pc/ether8169.c
@@ -919,8 +919,10 @@
 	int x;
 
 	ctlr = edev->ctlr;
-	x = ctlr->rdh;
-	for(;;){
+	if(ctlr->nrq < ctlr->nrd/2)
+		rtl8169replenish(ctlr);
+
+	for(x = ctlr->rdh; x != ctlr->rdt;){
 		d = &ctlr->rd[x];
 		if((control = d->control) & Own)
 			break;
--