Date: Mon, 1 Nov 2004 08:26:45 +0000 (UTC) From: "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net> To: John-Mark Gurney <gurney_j@resnet.uoregon.edu> Cc: freebsd-amd64@freebsd.org Subject: Re: amd64/73360: sk0: watchdog timeout Message-ID: <Pine.BSF.4.53.0411010803250.90940@e0-0.zab2.int.zabbadoz.net> In-Reply-To: <20041101005735.GO22681@funkthat.com> References: <200410312115.i9VLFisD013971@www.freebsd.org> <x7u0sawn1b.fsf@bonnet.wsrcc.com> <20041101005735.GO22681@funkthat.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 31 Oct 2004, John-Mark Gurney wrote: > Wolfgang S. Rupprecht wrote this message on Sun, Oct 31, 2004 at 14:17 -0800: [patch] > > Hey, thanks for pointing this patch out... I've slightly modified it > to better handle IFF_OACTIVE since it's possible to clear the flag when > it shouldn't be... > > If people see this patch improve things, I'll commit it... I haven't > tested w/ my sk card yet though... it didn't improve the situtation here but made it worse:( that patch itself is not compileable that way anyway. sc is not defined in txeof. > Index: if_sk.c > =================================================================== > RCS file: /home/ncvs/src/sys/pci/if_sk.c,v > retrieving revision 1.86 > diff -u -r1.86 if_sk.c > --- if_sk.c 20 Aug 2004 06:22:04 -0000 1.86 > +++ if_sk.c 1 Nov 2004 00:54:20 -0000 > @@ -1816,11 +1816,13 @@ > } > > /* Transmit */ > - sc_if->sk_cdata.sk_tx_prod = idx; > - CSR_WRITE_4(sc, sc_if->sk_tx_bmu, SK_TXBMU_TX_START); > + if (idx != sc_if->sk_cdata.sk_tx_prod) { > + sc_if->sk_cdata.sk_tx_prod = idx; > + CSR_WRITE_4(sc, sc_if->sk_tx_bmu, SK_TXBMU_TX_START); > > - /* Set a timeout in case the chip goes out to lunch. */ > - ifp->if_timer = 5; > + /* Set a timeout in case the chip goes out to lunch. */ > + ifp->if_timer = 5; > + } > SK_IF_UNLOCK(sc_if); > > return; [pasted in] @@ -1937,10 +1940,12 @@ static void sk_txeof(sc_if) struct sk_if_softc *sc_if; { + struct sk_softc *sc; struct sk_tx_desc *cur_tx = NULL; struct ifnet *ifp; u_int32_t idx; + sc = sc_if->sk_softc; ifp = &sc_if->arpcom.ac_if; /* > @@ -1960,13 +1962,15 @@ > } > sc_if->sk_cdata.sk_tx_cnt--; > SK_INC(idx, SK_TX_RING_CNT); > - ifp->if_timer = 0; > } > > - sc_if->sk_cdata.sk_tx_cons = idx; > - > - if (cur_tx != NULL) > + if (sc_if->sk_cdata.sk_tx_cnt == 0) { > + ifp->if_timer = 0; > ifp->if_flags &= ~IFF_OACTIVE; > + } else /* nudge chip to keep tx ring moving */ > + CSR_WRITE_4(sc, sc_if->sk_tx_bmu, SK_TXBMU_TX_START); > + > + sc_if->sk_cdata.sk_tx_cons = idx; > > return; > } if I add two printfs to each rxeof,txeof to print i resp. idx this slows down processing to about 120KB/s and make the thing live for about 3-6 MB transferred before "hanging". The output of the time the hanging starts looks like that: legend: tx = txeof rx = rxeof s = start e = end i = i,idx output: rx s i=47 rx e i=54 tx s i=104 tx e i=126 rx s i=54 rx e i=60 tx s i=126 tx e i=150 rx s i=60 rx e i=67 tx s i=150 tx e i=161 rx s i=67 rx e i=71 tx s i=161 tx e i=163 tx s i=163 tx e i=190 rx s i=71 rx e i=78 tx s i=190 tx e i=217 rx s i=78 rx e i=82 tx s i=217 tx e i=230 tx s i=230 tx e i=232 tx s i=232 tx e i=235 tx s i=235 tx e i=237 tx s i=237 tx e i=240 tx s i=240 tx e i=242 tx s i=242 tx e i=244 tx s i=244 tx e i=247 tx s i=247 tx e i=249 tx s i=249 tx e i=251 tx s i=251 tx e i=254 tx s i=254 tx e i=256 tx s i=256 tx e i=258 tx s i=258 tx e i=260 tx s i=260 tx e i=263 tx s i=263 tx e i=265 tx s i=265 tx e i=267 tx s i=267 tx e i=270 tx s i=270 tx e i=272 tx s i=272 tx e i=275 tx s i=275 tx e i=277 tx s i=277 tx e i=280 The funny thing is if I go into the "also hanging" xterm where I logged in on that amd64 with ssh and started the ftp put from and then hit some keys like enter I will see Rx intr fired again: rx s i=82 rx e i=83 tx s i=297 tx e i=298 rx s i=83 rx e i=84 tx s i=298 tx e i=301 rx s i=84 rx e i=85 tx s i=301 tx e i=304 rx s i=85 rx e i=86 tx s i=304 tx e i=305 tx s i=305 tx e i=308 tx s i=308 tx e i=311 rx s i=86 rx e i=87 tx s i=311 tx e i=313 rx s i=87 rx e i=88 tx s i=313 tx e i=314 -- Bjoern A. Zeeb bzeeb at Zabbadoz dot NeT
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.53.0411010803250.90940>