From abed1fae8173dc79d02d684eedc2ad4941636d15 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Thu, 14 Mar 2002 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 2002-03-14 --- pc/devether.c | 3 ++- pc/i8253.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pc/devether.c b/pc/devether.c index ee8de484f49d1392e4876db1e053189e9217a04c..884ab73f6440b4dc6bba3f66d7a13b04d113cb2d 100644 --- a/pc/devether.c +++ b/pc/devether.c @@ -176,7 +176,8 @@ etheriq(Ether* ether, Block* bp, int fromwire) else if(xbp = iallocb(len)){ memmove(xbp->wp, pkt, len); xbp->wp += len; - qpass(f->in, xbp); + if(qpass(f->in, xbp) < 0) + ether->soverflows++; } else ether->soverflows++; diff --git a/pc/i8253.c b/pc/i8253.c index a81ce4847f4af5b9410579da487115e014e9d19e..7d6f478af37a150040ccddd51901062bbb54a00b 100644 --- a/pc/i8253.c +++ b/pc/i8253.c @@ -259,7 +259,7 @@ i8253enable(void) { i8253.when = fastticks(nil); i8253.fastperiod = (m->cpuhz + HZ/2) / HZ; - i8253.fast2freq = m->cpuhz * FreqMul / Freq; + i8253.fast2freq = (vlong)m->cpuhz * FreqMul / Freq; i8253.enabled = 1; intrenable(IrqCLOCK, clockintr0, 0, BUSUNKNOWN, "clock"); }