From owner-cvs-all@FreeBSD.ORG Fri Dec 15 16:36:24 2006 Return-Path: X-Original-To: cvs-all@freebsd.org Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 09A2416A49E; Fri, 15 Dec 2006 16:36:24 +0000 (UTC) (envelope-from bde@zeta.org.au) Received: from mailout1.pacific.net.au (mailout1-3.pacific.net.au [61.8.2.210]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1351643E30; Fri, 15 Dec 2006 16:29:41 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout1.pacific.net.au (Postfix) with ESMTP id 0195C5AFFFC; Sat, 16 Dec 2006 03:31:13 +1100 (EST) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id 9B38A27408; Sat, 16 Dec 2006 03:31:11 +1100 (EST) Date: Sat, 16 Dec 2006 03:31:11 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Jung-uk Kim In-Reply-To: <20061214152805.D2109@besplex.bde.org> Message-ID: <20061216031759.N11941@delplex.bde.org> References: <200612132051.kBDKppS4058663@repoman.freebsd.org> <200612131846.33252.jkim@FreeBSD.org> <20061214152805.D2109@besplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: cvs-src@freebsd.org, src-committers@freebsd.org, Scott Long , cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/dev/bge if_bge.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2006 16:36:24 -0000 On Thu, 14 Dec 2006, I wrote: > On Wed, 13 Dec 2006, Jung-uk Kim wrote: > >> On Wednesday 13 December 2006 03:51 pm, Scott Long wrote: >>> scottl 2006-12-13 20:51:51 UTC >>> >>> FreeBSD src repository >>> >>> Modified files: >>> sys/dev/bge if_bge.c >>> Log: >>> Remove a redundant write of the firmware reset magic number. It >>> ... >> I am still getting firmware handshake timeouts and/or watchdog >> timeouts. Most importantly it panics or get witness warnings (lots >> of 'memory modified after free'). Panic goes like this (while >> kldunload if_bge with dhclient enabled): >> >> brgphy0: detached >> miibus0: detached >> bge0: firmware handshake timed out, found 0x4b657654 >> bge0: firmware handshake timed out, found 0x4b657654 > > I have seen these for debugging the redundant-write problem (not for > detach but for bringing up the interface for the first time). My 5701 > just hangs if there is any redundant write (2 where the first one was > in bge_reset(), or 2 separate, or 2 where the second one was). My > 5705 survives two separate sets of 256 repeated writes; however, then > the firmware handshake times out; however2, everything works normally > after ignoring the the timeout except for printing the message. I > just noticed that this error wasn't ignored until recently -- I noticed > the return statement being removed but not that it was in a critical > area. The debugging code doesn't seem to have been responsible for this. Now, without it I almost (?) always get handshake errors on the 5705, but never (?) on the 5701. Apparently, the 3rd write (the one that was removed) was the only correctly placed one. > I just noticed that the code is much clearer and less surprising in old > versions. In rev.1.84, there is only 1 write and it is immediately > followed by the handshake loop. Now there is a lot of code in between. This is relevant too. Rev.1.141 moved the only write of the magic value from just before the handshake to much earlier, where it became the third write just before it was removed, to ``Resolve "firmware handshake" error on 5702''. Bruce