Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Apr 2006 14:57:05 +0400
From:      Oleg Bulyzhin <oleg@freebsd.org>
To:        Lars Erik Gullerud <lerik@nolink.net>
Cc:        freebsd-net@freebsd.org
Subject:   Re: Watchdog timeouts and dead network on bge - 6.1-RC1
Message-ID:  <20060425105705.GA81386@lath.rinet.ru>
In-Reply-To: <20060425114958.W22198@electra.nolink.net>
References:  <20060423114810.P36951@electra.nolink.net> <20060424124736.GA72623@lath.rinet.ru> <20060425114958.W22198@electra.nolink.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--3lcZGd9BuhuYXNfi
Content-Type: multipart/mixed; boundary="ikeVEW9yuYc//A+q"
Content-Disposition: inline


--ikeVEW9yuYc//A+q
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Apr 25, 2006 at 11:59:39AM +0200, Lars Erik Gullerud wrote:
> On Mon, 24 Apr 2006, Oleg Bulyzhin wrote:
>=20
> >Could you try attached patch? It should fix problem when link goes UP but
> >network is still down.
> >
> >About bge resets: you should try if_bge.c rev.1.126, it may help.
> >
> >P.S. anyway, please report how is it going.
>=20
> I'll try your patch, however as we can't reproduce this on demand (only=
=20
> happens sometimes under heavy load) it might be a while before I can give=
=20
> you any feedback.
>=20
> Regarding trying rev.1.126 from HEAD - I looked at the source and I see=
=20
> some other modifications in 1.126 compared to the version in RELENG_6,=20
> specifically, there are a lot of replacements of IFP2ENADDR with IF_LLADR=
,=20
> that seems to have been commited in version 1.99 by ru, and some changes=
=20
> regarding VLAN_INPUT_TAG_NEW vs. VLAN_INPUT_TAG.
>=20
> Since these changes have not been MFC'ed to RELENG_6, I gather there is a=
=20
> reason for that - so can 1.126 be used directly on 6.1, or do I need to=
=20
> hand-edit the other changes in 1.126 into the stock RELENG_6 if_bge.c to=
=20
> test this version?
>=20
> /leg

Sorry i was not clear enough. Talking about rev 1.126 i meant applying
diff between rev.1.125 and rev.1.126
(i've created one  - it's attached to this mail).

--=20
Oleg.

--ikeVEW9yuYc//A+q
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="bge_intr.diff"
Content-Transfer-Encoding: quoted-printable

Index: if_bge.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/ncvs/src/sys/dev/bge/if_bge.c,v
retrieving revision 1.125
retrieving revision 1.126
diff -u -r1.125 -r1.126
--- if_bge.c	17 Mar 2006 09:17:36 -0000	1.125
+++ if_bge.c	15 Apr 2006 08:13:06 -0000	1.126
@@ -2788,27 +2788,23 @@
 	}
 #endif
=20
-	bus_dmamap_sync(sc->bge_cdata.bge_status_tag,
-	    sc->bge_cdata.bge_status_map, BUS_DMASYNC_POSTREAD);
+	/*
+	 * Do the mandatory PCI flush as well as get the link status.
+	 */
+	statusword =3D CSR_READ_4(sc, BGE_MAC_STS) & BGE_MACSTAT_LINK_CHANGED;
=20
-	statusword =3D
-	    atomic_readandclear_32(&sc->bge_ldata.bge_status_block->bge_status);
+	/* Ack interrupt and stop others from occuring. */
+	CSR_WRITE_4(sc, BGE_MBX_IRQ0_LO, 1);
=20
+	/* Make sure the descriptor ring indexes are coherent. */
+	bus_dmamap_sync(sc->bge_cdata.bge_status_tag,
+	    sc->bge_cdata.bge_status_map, BUS_DMASYNC_POSTREAD);
 	bus_dmamap_sync(sc->bge_cdata.bge_status_tag,
 	    sc->bge_cdata.bge_status_map, BUS_DMASYNC_PREREAD);
=20
-#ifdef notdef
-	/* Avoid this for now -- checking this register is expensive. */
-	/* Make sure this is really our interrupt. */
-	if (!(CSR_READ_4(sc, BGE_MISC_LOCAL_CTL) & BGE_MLC_INTR_STATE))
-		return;
-#endif
-	/* Ack interrupt and stop others from occuring. */
-	CSR_WRITE_4(sc, BGE_MBX_IRQ0_LO, 1);
-
 	if ((sc->bge_asicrev =3D=3D BGE_ASICREV_BCM5700 &&
 	    sc->bge_chipid !=3D BGE_CHIPID_BCM5700_B1) ||
-	    statusword & BGE_STATFLAG_LINKSTATE_CHANGED || sc->bge_link_evt)
+	    statusword || sc->bge_link_evt)
 		bge_link_upd(sc);
=20
 	if (ifp->if_drv_flags & IFF_DRV_RUNNING) {

--ikeVEW9yuYc//A+q--

--3lcZGd9BuhuYXNfi
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (FreeBSD)

iD8DBQFETgCBryLc73jOEF8RAmmgAJ98ANUc+xOfIDSLS+ZTwu0KJLoA0gCght+E
v3IbolHGLFRwWjrdqDBcmCA=
=RHga
-----END PGP SIGNATURE-----

--3lcZGd9BuhuYXNfi--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060425105705.GA81386>