*BSD News Article 74163


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!spool.mu.edu!howland.reston.ans.net!swrinde!newsfeed.internetmci.com!news.mathworks.com!nntp.primenet.com!uunet!inXS.uu.net!news.iij.ad.jp!tyo2.gate.nec!newssv1.ho.nec!newsserv.cl.nec!sbl.cl.nec!newsmasters@sbl.cl.nec.co.jp
From: nao@sbl.cl.nec.co.jp (Naoki Hamada)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: problem with 3c590
Date: 17 Jul 1996 11:35:07 +0900
Organization: NEC Corporation
Lines: 64
Sender: nao@sirius.sbl.cl.nec.co.jp
Distribution: world
Message-ID: <uphgr71uas.fsf@sirius.sbl.cl.nec.co.jp>
References: <4rf9u3$7vp@news.uit.no> <4rl1vb$u3@anorak.coverform.lan>
	<4rt0bd$4fl@uriah.heep.sax.de> <4s0hqt$a6@anorak.coverform.lan>
	<4s4n0a$721@phobos.Candle.Com>
NNTP-Posting-Host: sirius.sbl.cl.nec.co.jp
In-reply-to: mevans@candle.com's message of Fri, 12 Jul 96 00:13:50
X-Newsreader: Gnus v5.0.15

Mike wrote:
>An alternative fix
>might be to check free FIFO space again, after requesting the transmit
>available interrupt, but I haven't bothered pursuing this.

OK, I tried it. I have no 3C590, so I am not sure if it really works.

J"org wrote:
>When it's hanging, it doesn't unwedge itself.  Re-ifconfig'ing is the
>only way out.

Because the watchdog always sleeps. I woke it up :-)

-nao

--- if_vx.c.1.10	Wed Jul 17 09:14:25 1996
+++ if_vx.c	Wed Jul 17 10:39:52 1996
@@ -512,9 +512,12 @@
     if (inw(BASE + VX_W1_FREE_TX) < len + pad + 4) {
 	/* no room in FIFO */
 	outw(BASE + VX_COMMAND, SET_TX_AVAIL_THRESH | (len + pad + 4));
-	sc->arpcom.ac_if.if_flags |= IFF_OACTIVE;
-	splx(s);
-	return;
+	/* confirmation */
+	if (inw(BASE + VX_W1_FREE_TX) < len + pad + 4) {
+	    sc->arpcom.ac_if.if_flags |= IFF_OACTIVE;
+	    splx(s);
+	    return;
+	}
     }
     IF_DEQUEUE(&sc->arpcom.ac_if.if_snd, m);
 
@@ -558,6 +561,7 @@
     }
 #endif
 
+    sc->arpcom.ac_if.if_timer=2;
     sc->arpcom.ac_if.if_opackets++;
     m_freem(top);
     /*
@@ -613,12 +617,14 @@
 	}
 	if (status & S_TX_AVAIL) {
 	    /* we need ACK */
+	    sc->arpcom.ac_if.if_timer=0;
 	    sc->arpcom.ac_if.if_flags &= ~IFF_OACTIVE;
 	    GO_WINDOW(1);
 	    inw(BASE + VX_W1_FREE_TX);
 	    vxstart(&sc->arpcom.ac_if);
 	}
 	if (status & S_CARD_FAILURE) {
+	    sc->arpcom.ac_if.if_timer=0;
 #ifdef VX_LOCAL_STATS
 	    printf("\nvx%d:\n\tStatus: %x\n", unit, status);
 	    GO_WINDOW(4);
@@ -637,6 +643,7 @@
 	    return;
 	}
 	if (status & S_TX_COMPLETE) {
+	    sc->arpcom.ac_if.if_timer=0;
 	    /* we  need ACK. we do it at the end */
 	    /*
 	     * We need to read TX_STATUS until we get a 0 status in order to