Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Jun 2006 21:53:03 +0200
From:      Ulrich Spoerlein <uspoerlein@gmail.com>
To:        current@freebsd.org
Subject:   [PATCH] Call for bfe(4) testers
Message-ID:  <20060607195303.GA3225@roadrunner.q.local>

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

--jq0ap7NbKX2Kqbes
Content-Type: multipart/mixed; boundary="tKW2IUtsqtDRztdT"
Content-Disposition: inline


--tKW2IUtsqtDRztdT
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi,

I investigated a bug/missing feature in the bfe(4) driver, which makes
it not see any LINK DOWN events unless you happen to invoke ifconfig.

If you are running bfe hardware, *please* test the following (NO
PATCHING OR REBOOTING REQUIRED)

1. Plug in ethernet cable
2. Watch dmesg/syslogd for the LINK UP message
3. Remove the cable
4. Do you see a LINK DOWN message? Does it appear after you issue
'ifconfig'?

Please run these simple steps and report back to me, if you get the LINK
DOWN message or not and which hardware you are running. For reference,
mine is a BCM4401, card=3D0x81271028 chip=3D0x440114e4 rev=3D0x01.

If you want to give the patch a try, you are of course encouraged to do
so.

Ulrich Spoerlein
--=20
 PGP Key ID: 20FEE9DD				Encrypted mail welcome!
Fingerprint: AEC9 AF5E 01AC 4EE1 8F70  6CBD E76E 2227 20FE E9DD
Which is worse: ignorance or apathy?
Don't know. Don't care.

--tKW2IUtsqtDRztdT
Content-Type: text/plain; charset=us-ascii
Content-Description: if_bfe.c.diff
Content-Disposition: attachment; filename="if_bfe.patch3"
Content-Transfer-Encoding: quoted-printable

--- if_bfe.c.orig	Wed Jun  7 21:34:49 2006
+++ if_bfe.c	Wed Jun  7 21:37:07 2006
@@ -1552,17 +1552,21 @@ bfe_tick(void *xsc)
 	mii =3D device_get_softc(sc->bfe_miibus);
=20
 	bfe_stats_update(sc);
-	sc->bfe_stat_ch =3D timeout(bfe_tick, sc, hz);
=20
-	if(sc->bfe_link) {
-		BFE_UNLOCK(sc);
-		return;
+	if (sc->bfe_miibus !=3D NULL)
+		mii_tick(mii);
+
+	if (!sc->bfe_link) {
+		if (mii->mii_media_status & IFM_ACTIVE)
+			sc->bfe_link++;
+	} else {
+		mii_pollstat(mii);
+
+		if (!(mii->mii_media_status & IFM_ACTIVE))
+			sc->bfe_link =3D 0;
 	}
=20
-	mii_tick(mii);
-	if (!sc->bfe_link && mii->mii_media_status & IFM_ACTIVE &&
-			IFM_SUBTYPE(mii->mii_media_active) !=3D IFM_NONE)
-		sc->bfe_link++;
+	sc->bfe_stat_ch =3D timeout(bfe_tick, sc, hz);
=20
 	BFE_UNLOCK(sc);
 }

--tKW2IUtsqtDRztdT--

--jq0ap7NbKX2Kqbes
Content-Type: application/pgp-signature
Content-Disposition: inline

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

iD8DBQFEhy6f524iJyD+6d0RAsAZAKCcCQ0wJT+fxNzS9Fzu9mMHa//DQwCfZLaP
csgmDqxYyHAta/lRZ1hEzPo=
=W3P5
-----END PGP SIGNATURE-----

--jq0ap7NbKX2Kqbes--



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