From owner-cvs-src@FreeBSD.ORG Wed Dec 13 18:11:26 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 924C116A519; Wed, 13 Dec 2006 18:11:26 +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 E6A0143DB0; Wed, 13 Dec 2006 18:09:12 +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 kBDIAYNT013552; Wed, 13 Dec 2006 11:10:41 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <4580421A.7020905@samsco.org> Date: Wed, 13 Dec 2006 11:10:34 -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: <200612120511.kBC5BCvi018697@repoman.freebsd.org> <20061212231257.M91892@maildrop.int.zabbadoz.net> <20061213113025.O833@delplex.bde.org> <457F820B.6040104@samsco.org> <20061213125524.G91892@maildrop.int.zabbadoz.net> <20061214025300.A1220@besplex.bde.org> In-Reply-To: <20061214025300.A1220@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, "Bjoern A. Zeeb" , Scott Long , cvs-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/bge if_bge.c if_bgereg.h 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: Wed, 13 Dec 2006 18:11:26 -0000 Bruce Evans wrote: > On Wed, 13 Dec 2006, Bjoern A. Zeeb wrote: > >> On Tue, 12 Dec 2006, Scott Long wrote: >> [..] >>> I'll try to run some tests with the third write disabled, but I don't >>> have much time left to devote to this particular project. If others >>> would be willing to test with the third write removed, I'd appreciate >>> it. It might be interesting to test with the second write removed as >>> well (i.e. both writes in bge_reset). I'll post patches if anyone wants >>> to test but can't grok what I'm saying here. >> >> ok, I only tried with the two writes removed from bge_reset and it >> started to work again. At least the machine no longer hangs on boot >> and the first bge port works. Cannot easily test more atm. > > I'm getting closer to testing with various numbers of writes together > with optionally waiting for the firmware to indicate sync by complementing > the value. Maybe the problem is just that the firmware doesn't like > the value being set without syncing with the previous setting. > > While editing, I noticed that the first write (in bge_sig_pre_reset()) > is already avoided except in asf mode because "Some chips don't like > it". Someone named scottl may have already been bitten by this. He > added a tunable to kill the default of asf mode being enabled, since > leaving it enabled gave a complete system freeze for the same operation > that now freezes on the third write. > > Bruce Ah, you're right, I missed that silly little if statement in the bge_sig_pre_reset function. So I think a reasonable guess here is that the chip doesn't like back-to-back writes of the magic number, and that it was only working for the ASF case because that case was forcing an intervening write. The right solution would be to un-conditionalize the write in bge_sig_pre_reset and remove both writes from bge_reset. This would also match Linux. Again, my ability to test is limited. I also no longer posses the system that had the ASF problem. Any help here is appreciated. Scott