From owner-cvs-src@FreeBSD.ORG Thu Dec 14 05:38:30 2006 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B27E216A416; Thu, 14 Dec 2006 05:38:30 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 52D0043CAC; Thu, 14 Dec 2006 05:36:54 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.11] (phobos.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id kBE5cKuf018804; Wed, 13 Dec 2006 22:38:26 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <4580E34A.9070104@samsco.org> Date: Wed, 13 Dec 2006 22:38:18 -0700 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.0.7) Gecko/20060910 SeaMonkey/1.0.5 MIME-Version: 1.0 To: Bruce Evans References: <200612132051.kBDKppS4058663@repoman.freebsd.org> <200612131846.33252.jkim@FreeBSD.org> <20061214152805.D2109@besplex.bde.org> In-Reply-To: <20061214152805.D2109@besplex.bde.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.1.1 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on pooker.samsco.org Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org, Jung-uk Kim Subject: Re: cvs commit: src/sys/dev/bge if_bge.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2006 05:38:30 -0000 Bruce Evans 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. > > I also tested waiting for the handshake immediately after the write > in some cases (only for 2 separate writes on the 5701). This didn't > help. I didn't check exactly where the hang occurred or if some of > the handshakes completed successfully. > > Throughout this, bge_reset()s done before reaching single mode all > completed successfully. There were 2 per boot. The first 2 seem > to do just enough initialization to make the link flap. > > 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. > > Bruce I made firmware handshake errors be ignored since Linux also made a point to ignore them. However, I think that they are just a secondary problem now. Just for my reference, what is special to you about rev 1.84? Scott