Date: Wed, 30 Aug 2006 11:53:33 +0400 From: Gleb Smirnoff <glebius@FreeBSD.org> To: Ganbold <ganbold@micom.mng.net> Cc: pyunyh@gmail.com, freebsd-stable@FreeBSD.org, oleg@FreeBSD.org Subject: Re: panic: invalid ife->ifm_data (0xa) in mii_phy_setmedia Message-ID: <20060830075333.GQ76666@cell.sick.ru> In-Reply-To: <44F504A8.8070503@micom.mng.net> References: <44F4F1DE.2030907@micom.mng.net> <20060830023537.GA47208@cdnetworks.co.kr> <44F504A8.8070503@micom.mng.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--XRI2XbIfl/05pQwm Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Ganbold, On Wed, Aug 30, 2006 at 12:23:20PM +0900, Ganbold wrote: G> Thanks a lot for your patch. Your patch fixes panic, however I still see G> bge0: firmware handshake timed out G> bge0: link state changed to DOWN G> messages. And yesterday delphij@ have sent me patch against "firmware handshake timed out". It is attached. Can you please test it? -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE --XRI2XbIfl/05pQwm Content-Type: message/rfc822 Content-Disposition: inline Received: from relay.bestcom.ru (relay.bestcom.ru [217.72.144.5]) by cell.sick.ru (8.13.4/8.13.3) with ESMTP id k7T6e7Xv016363 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for <glebius@cell.sick.ru>; Tue, 29 Aug 2006 10:40:09 +0400 (MSD) (envelope-from delphij@delphij.net) Received: from relay2.bestcom.ru (relay2.bestcom.ru [217.72.144.6]) by relay.bestcom.ru (8.13.1/8.12.9) with ESMTP id k7T6e7wc085014 for <glebius@bestcom.ru>; Tue, 29 Aug 2006 10:40:07 +0400 (MSD) (envelope-from delphij@delphij.net) Received: from localhost (localhost [127.0.0.1]) by relay2.bestcom.ru (Postfix) with ESMTP id 54C2C4ACFF for <glebius@bestcom.ru>; Tue, 29 Aug 2006 10:41:17 +0400 (MSD) X-Virus-Scanned: by amavisd-new using ClamAV at bestcom.ru Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by relay2.bestcom.ru (Postfix) with ESMTP id 363944ACE5 for <glebius@bestcom.ru>; Tue, 29 Aug 2006 10:41:02 +0400 (MSD) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 89D8655D1E for <glebius@bestcom.ru>; Tue, 29 Aug 2006 06:39:51 +0000 (GMT) (envelope-from delphij@delphij.net) Received: by hub.freebsd.org (Postfix) id 8757216A4DD; Tue, 29 Aug 2006 06:39:51 +0000 (UTC) Delivered-To: glebius@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6D5CE16A4DA; Tue, 29 Aug 2006 06:39:51 +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 CAA6943D46; Tue, 29 Aug 2006 06:39:47 +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 6D313EB36ED; Tue, 29 Aug 2006 14:39:44 +0800 (CST) 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 QogYaXnZOkbA; Tue, 29 Aug 2006 14:39:41 +0800 (CST) Received: from [10.217.12.84] (sina152-194.staff.sina.com.cn [61.135.152.194]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTP id 28AABEB24F9; Tue, 29 Aug 2006 14:39:40 +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=OhhR7GxJD73QxLVSnBlkBP7VFzdJuFRkqw0Otm+xWE8WJMu9E3lvxZFN/3V8Hurg6 HlUR3J6L7G8zSx1zuK3ZQ== Message-ID: <44F3E123.7000100@delphij.net> Date: Tue, 29 Aug 2006 14:39:31 +0800 From: LI Xin <delphij@delphij.net> Organization: The FreeBSD Project User-Agent: Thunderbird 1.5.0.5 (Macintosh/20060719) MIME-Version: 1.0 To: oleg@FreeBSD.org, glebius@FreeBSD.org Subject: [PATCH FOR REVIEW] Broadcom BCM 5752 A02 "firmware handshake timeout" X-Enigmail-Version: 0.94.1.0 Content-Type: multipart/signed; micalg=pgp-ripemd160; protocol="application/pgp-signature"; boundary="------------enig080E669DC7176E89A24520D7" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig080E669DC7176E89A24520D7 Content-Type: multipart/mixed; boundary="------------070402090405020206020700" This is a multi-part message in MIME format. --------------070402090405020206020700 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi, A colleague of mine has found that BCM 5752 A02 would get "firmware handshake timeout" problem during the ifconfig stage. After some investigation and comparing to the Linux driver I have the attached patch make the problem disappear. Unfortunately I do not have specification documentation from Broadcom so I can not say if that is a "real fix" :-( The patch was tested on Dell Latitude D820. The only problem remains is that the -CURRENT kernel crashes if I did not explicitly set the media and do a "ifconfig bge0 up", with "panic: invalid ife->ifm_data (0xa) in mii_phy_setmedia". Backtrace is available upon request. Cheers, --=20 Xin LI <delphij@delphij.net> http://www.delphij.net/ FreeBSD - The Power to Serve! --------------070402090405020206020700 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 --------------070402090405020206020700-- --------------enig080E669DC7176E89A24520D7 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 iD8DBQFE8+EjOfuToMruuMARAxxmAKCK7Qy6CCGCW1uq1NTuAlnNWGqjzwCghN39 dmZJszLIGj5poU7Jet4jg/Q= =vPM8 -----END PGP SIGNATURE----- --------------enig080E669DC7176E89A24520D7-- --XRI2XbIfl/05pQwm--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060830075333.GQ76666>