From owner-freebsd-current@FreeBSD.ORG Wed Aug 30 17:07:28 2006 Return-Path: X-Original-To: freebsd-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 7E0E416A4E7 for ; Wed, 30 Aug 2006 17:07:28 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [210.51.165.229]) by mx1.FreeBSD.org (Postfix) with ESMTP id 609E143D6B for ; Wed, 30 Aug 2006 17:07:14 +0000 (GMT) (envelope-from delphij@delphij.net) Received: from localhost (tarsier.geekcn.org [210.51.165.229]) by tarsier.geekcn.org (Postfix) with ESMTP id 37D76EB3F58 for ; Thu, 31 Aug 2006 01:06:59 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([210.51.165.229]) by localhost (mail.geekcn.org [210.51.165.229]) (amavisd-new, port 10024) with ESMTP id fJzLZwkRNEit for ; Thu, 31 Aug 2006 01:06:57 +0800 (CST) Received: from [192.168.1.32] (unknown [221.221.170.128]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTP id 16044EB3711 for ; Thu, 31 Aug 2006 01:06:56 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:organization:user-agent:mime-version:to: subject:x-enigmail-version:content-type; b=JO00EQZXpgagc5TIqudFFNoWIVAoNOr3bSplln/7V1CBCxsZ18KszGb36N8P4ARfW gm+QHMdm+cZsg0UyjR0Xg== Message-ID: <44F5C5A9.30605@delphij.net> Date: Thu, 31 Aug 2006 01:06:49 +0800 From: LI Xin Organization: The FreeBSD Project User-Agent: Thunderbird 1.5.0.5 (Macintosh/20060719) MIME-Version: 1.0 To: freebsd-current@freebsd.org X-Enigmail-Version: 0.94.1.0 Content-Type: multipart/signed; micalg=pgp-ripemd160; protocol="application/pgp-signature"; boundary="------------enig5E2B94627565C3050F2C49E6" Subject: bge(4) on BCM 5752 A02 panic due to media autoselect 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, 30 Aug 2006 17:07:28 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig5E2B94627565C3050F2C49E6 Content-Type: multipart/mixed; boundary="------------030809030602070801010603" This is a multi-part message in MIME format. --------------030809030602070801010603 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi, folks, Recently one of my colleagues found that BCM 5752 A02 on Dell Latitude D820 would get "panic: invalid ife->ifm_data (0xa) in mii_phy_setmedia". After some investigation I have found that removing BCMR_ANEG from mii_capabilities in ukphy.c would work around the problem, and it turns out that without explicitly specifying media type, the code will finally get to pass the "intentionally invalid index" to mii_phy_setmedia and trigger an assertion fail. I have not tested the situation in -STABLE yet, but it was said to work there, though. Is there anyone can shed some light to me about how to debug the issue? Thanks in advance! PS. During the debugging I have found that the attached patch can make "bge0: firmware handshake timeout" issue disappear from the said chip. Because I do not have Broadcom specification at hand I would like to see if there is someone to give appropriate review for it. Cheers, --=20 Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! --------------030809030602070801010603 Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0"; name="patch-bge-firmware-handshake-timeout" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; filename="patch-bge-firmware-handshake-timeout" 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.140 diff -u -r1.140 if_bge.c --- if_bge.c 24 Aug 2006 14:41:16 -0000 1.140 +++ if_bge.c 29 Aug 2006 06:20:44 -0000 @@ -2313,6 +2313,13 @@ BGE_PCIMISCCTL_INDIRECT_ACCESS|BGE_PCIMISCCTL_MASK_PCI_INTR| BGE_HIF_SWAP_OPTIONS|BGE_PCIMISCCTL_PCISTATE_RW, 4); =20 + /* XXX: Broadcom Linux driver. */ + if (sc->bge_asicrev =3D=3D BGE_ASICREV_BCM5752 || + sc->bge_asicrev =3D=3D BGE_ASICREV_BCM5755 || + sc->bge_asicrev =3D=3D BGE_ASICREV_BCM5787) { + CSR_WRITE_4(sc, BGE_FASTBOOT_PC, 0x0); + } + reset =3D BGE_MISCCFG_RESET_CORE_CLOCKS|(65<<1); =20 /* XXX: Broadcom Linux driver. */ Index: if_bgereg.h =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_bgereg.h,v retrieving revision 1.52 diff -u -r1.52 if_bgereg.h --- if_bgereg.h 23 Aug 2006 11:32:54 -0000 1.52 +++ if_bgereg.h 29 Aug 2006 06:32:31 -0000 @@ -1656,6 +1656,7 @@ #define BGE_EE_CTL 0x6840 #define BGE_MDI_CTL 0x6844 #define BGE_EE_DELAY 0x6848 +#define BGE_FASTBOOT_PC 0x6894 =20 /* Mode control register */ #define BGE_MODECTL_INT_SNDCOAL_ONLY 0x00000001 --------------030809030602070801010603-- --------------enig5E2B94627565C3050F2C49E6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFE9cWqOfuToMruuMARAxZ8AKCMS1hedr7ya6EVVBKtxMo9jkBumgCfQv8r gg3dbtr027q5nWVMgHbgEFw= =IGaD -----END PGP SIGNATURE----- --------------enig5E2B94627565C3050F2C49E6--