From owner-freebsd-current@FreeBSD.ORG Thu Aug 31 10:24:09 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 065FE16A4DE for ; Thu, 31 Aug 2006 10:24:09 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.178]) by mx1.FreeBSD.org (Postfix) with ESMTP id BD6CE43D82 for ; Thu, 31 Aug 2006 10:23:48 +0000 (GMT) (envelope-from pyunyh@gmail.com) Received: by py-out-1112.google.com with SMTP id o67so680207pye for ; Thu, 31 Aug 2006 03:23:48 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:from:to:cc:subject:message-id:reply-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=BfZ4LYT7ZV51ye77aR3DLSUY2tRAnBAyIyovDhrZxmJaEbVd7pEj0Fm1WPfCo/nbmo/T+BDEURg+PsM2ZWl7I8557svneb2cOpcESJST2Rvcp2Cw14m6TZT5KX2NcgLqfhwBY+Tl6w21FpOEEw8AlbpmgNO50+bmE2LkDJ2J8os= Received: by 10.35.114.16 with SMTP id r16mr447320pym; Thu, 31 Aug 2006 03:23:48 -0700 (PDT) Received: from michelle.cdnetworks.co.kr ( [211.53.35.84]) by mx.gmail.com with ESMTP id m2sm576488nzf.2006.08.31.03.23.46; Thu, 31 Aug 2006 03:23:48 -0700 (PDT) Received: from michelle.cdnetworks.co.kr (localhost.cdnetworks.co.kr [127.0.0.1]) by michelle.cdnetworks.co.kr (8.13.5/8.13.5) with ESMTP id k7VAPUTi054140 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 31 Aug 2006 19:25:30 +0900 (KST) (envelope-from pyunyh@gmail.com) Received: (from yongari@localhost) by michelle.cdnetworks.co.kr (8.13.5/8.13.5/Submit) id k7VAPTm2054139; Thu, 31 Aug 2006 19:25:29 +0900 (KST) (envelope-from pyunyh@gmail.com) Date: Thu, 31 Aug 2006 19:25:29 +0900 From: Pyun YongHyeon To: LI Xin Message-ID: <20060831102529.GE52038@cdnetworks.co.kr> References: <09BFF2FA5EAB4A45B6655E151BBDD90301E2F1CF@NT-IRVA-0750.brcm.ad.broadcom.com> <44F65687.2050108@delphij.net> <20060831033716.GB52038@cdnetworks.co.kr> <44F69AF1.5090205@delphij.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <44F69AF1.5090205@delphij.net> User-Agent: Mutt/1.4.2.1i Cc: David Christensen , freebsd-current@freebsd.org Subject: Re: 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 Reply-To: pyunyh@gmail.com List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Aug 2006 10:24:09 -0000 On Thu, Aug 31, 2006 at 04:16:49PM +0800, LI Xin wrote: > Pyun YongHyeon wrote: > > On Thu, Aug 31, 2006 at 11:24:55AM +0800, LI Xin wrote: > > > David Christensen wrote: > > > >> 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. > > > > > > > > Try the attached patch instead and let me know if it works. When > > > > FastBoot > > > > is enabled on supported Broadcom controllers it allows the controller to > > > > skip rereading firmware after a reset, allowing the driver to complete > > > > its initialization more quickly. The Linux driver specifically disables > > > > FastBoot because it performs some read/write tests to controller memory, > > > > potentially corrupting the firmware, so FastBoot is disabled to insure > > > > an > > > > error free firmware reload. We don't do the same test so the same > > > > change > > > > isn't necessary. The patch happens to work because the bge driver > > > > doesn't > > > > perform firmware synchronization correctly, and the firmware initializes > > > > too fast for the driver. > > > > > > Thank you for the patch. I have just tested the patch under > > > FreeBSD/i386 -CURRENT and the I can confirm that the firmware timeout > > > goes away. Will you please commit it? > > > > > > (Note that the panic still persists, I will try to get brgphy attach to > > > see if things changes). > > > > > > > It would be great if you can test the brgphy patch. I'll commit the > > patch if it work on your box. > > Sure, I would be more than happy to do that. Which brgphy patch do you > want me to test? (I have patched brgphy.c and miidevs to make BCM5752 > to attach as brgphy and it resolved the panic, but I am not quite sure > if that is what you want, though) > That's exactly the same patch I've made for stable. (You've already patched it to work on CURRENT.) -- Regards, Pyun YongHyeon