summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/src/9/pc/ether8169.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/src/9/pc/ether8169.c b/sys/src/9/pc/ether8169.c
index 02f39c5f3..734608ab9 100644
--- a/sys/src/9/pc/ether8169.c
+++ b/sys/src/9/pc/ether8169.c
@@ -919,8 +919,10 @@ rtl8169receive(Ether* edev)
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;