From owner-freebsd-stable@FreeBSD.ORG Wed Aug 30 08:22:49 2006 Return-Path: X-Original-To: freebsd-stable@FreeBSD.org Delivered-To: freebsd-stable@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 94A5616A4DD; Wed, 30 Aug 2006 08:22:49 +0000 (UTC) (envelope-from ganbold@micom.mng.net) Received: from publicd.ub.mng.net (publicd.ub.mng.net [202.179.0.88]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1A68C43D68; Wed, 30 Aug 2006 08:22:40 +0000 (GMT) (envelope-from ganbold@micom.mng.net) Received: from [202.179.0.164] (helo=[192.168.0.18]) by publicd.ub.mng.net with esmtpa (Exim 4.61 (FreeBSD)) (envelope-from ) id 1GILL5-000McH-Sd; Wed, 30 Aug 2006 17:22:24 +0900 Message-ID: <44F54ABF.30109@micom.mng.net> Date: Wed, 30 Aug 2006 17:22:23 +0900 From: Ganbold User-Agent: Thunderbird 1.5.0.4 (X11/20060612) MIME-Version: 1.0 To: Gleb Smirnoff References: <44F4F1DE.2030907@micom.mng.net> <20060830023537.GA47208@cdnetworks.co.kr> <44F504A8.8070503@micom.mng.net> <20060830075333.GQ76666@cell.sick.ru> In-Reply-To: <20060830075333.GQ76666@cell.sick.ru> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: pyunyh@gmail.com, oleg@FreeBSD.org, freebsd-stable@FreeBSD.org Subject: Re: panic: invalid ife->ifm_data (0xa) in mii_phy_setmedia X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Aug 2006 08:22:49 -0000 Gleb, Pyun, Gleb Smirnoff wrote: > 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? > Applied delphij@'s patch and now "bge0: firmware handshake timed out" message is gone. Previously there was applied Pyun's brgphy(4) patch. Ganbold > > > ------------------------------------------------------------------------ > > Subject: > [PATCH FOR REVIEW] Broadcom BCM 5752 A02 "firmware handshake timeout" > From: > LI Xin > Date: > Tue, 29 Aug 2006 14:39:31 +0800 > To: > oleg@FreeBSD.org, glebius@FreeBSD.org > > To: > oleg@FreeBSD.org, glebius@FreeBSD.org > > > 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, > > ------------------------------------------------------------------------ > > Index: if_bge.c > =================================================================== > 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); > > + /* XXX: Broadcom Linux driver. */ > + if (sc->bge_asicrev == BGE_ASICREV_BCM5752 || > + sc->bge_asicrev == BGE_ASICREV_BCM5755 || > + sc->bge_asicrev == BGE_ASICREV_BCM5787) { > + CSR_WRITE_4(sc, BGE_FASTBOOT_PC, 0x0); > + } > + > reset = BGE_MISCCFG_RESET_CORE_CLOCKS|(65<<1); > > /* XXX: Broadcom Linux driver. */ > Index: if_bgereg.h > =================================================================== > 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 > > /* Mode control register */ > #define BGE_MODECTL_INT_SNDCOAL_ONLY 0x00000001 > > ------------------------------------------------------------------------ > > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"