From owner-freebsd-current@FreeBSD.ORG Wed Jun 7 22:32:04 2006 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2C83916EE12 for ; Wed, 7 Jun 2006 20:09:05 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.186]) by mx1.FreeBSD.org (Postfix) with ESMTP id A4DD643D5A for ; Wed, 7 Jun 2006 20:08:52 +0000 (GMT) (envelope-from uspoerlein@gmail.com) Received: by nf-out-0910.google.com with SMTP id c31so202017nfb for ; Wed, 07 Jun 2006 13:08:51 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:from:to:subject:message-id:mail-followup-to:mime-version:content-type:content-disposition; b=uK4wVr6z7lEUW5lD3x5wzN6pYnYkxh+eZXif75jNlgeP0uV5Iid3kJz0Q1MsE/NQXH6lna+L9Vpj/8quuEAc8JOAQ3iCrFWdt+aM+tKnRM0BQ2hKH51aOiYsR5PT/LdrDbLqUA7FMLdRnraiyWcDmQvvqJcBZ/c9kNRBkn0KmbM= Received: by 10.49.93.15 with SMTP id v15mr827826nfl; Wed, 07 Jun 2006 13:08:51 -0700 (PDT) Received: from roadrunner.q.local ( [217.185.119.143]) by mx.gmail.com with ESMTP id z73sm1081512nfb.2006.06.07.13.08.38; Wed, 07 Jun 2006 13:08:51 -0700 (PDT) Received: from roadrunner.q.local (localhost [127.0.0.1]) by roadrunner.q.local (8.13.6/8.13.6) with ESMTP id k57K8Oxa003678 for ; Wed, 7 Jun 2006 22:08:24 +0200 (CEST) (envelope-from uspoerlein@gmail.com) Received: (from q@localhost) by roadrunner.q.local (8.13.6/8.13.6/Submit) id k57Jr4XA003438 for current@freebsd.org; Wed, 7 Jun 2006 21:53:04 +0200 (CEST) (envelope-from uspoerlein@gmail.com) Date: Wed, 7 Jun 2006 21:53:03 +0200 From: Ulrich Spoerlein To: current@freebsd.org Message-ID: <20060607195303.GA3225@roadrunner.q.local> Mail-Followup-To: current@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jq0ap7NbKX2Kqbes" Content-Disposition: inline Cc: Subject: [PATCH] Call for bfe(4) testers X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jun 2006 22:32:06 -0000 --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--