From owner-freebsd-firewire@FreeBSD.ORG Mon Aug 18 22:27:02 2008 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 290651065689; Mon, 18 Aug 2008 22:27:02 +0000 (UTC) (envelope-from sbruno@miralink.com) Received: from plato.miralink.com (mail.miralink.com [70.103.185.20]) by mx1.freebsd.org (Postfix) with ESMTP id E50BE8FC0A; Mon, 18 Aug 2008 22:27:01 +0000 (UTC) (envelope-from sbruno@miralink.com) Received: from localhost (localhost.localdomain [127.0.0.1]) by plato.miralink.com (Postfix) with ESMTP id BFEC71A90DC; Mon, 18 Aug 2008 15:19:34 -0700 (PDT) X-Virus-Scanned: amavisd-new at X-Spam-Flag: NO X-Spam-Score: -4.399 X-Spam-Level: X-Spam-Status: No, score=-4.399 tagged_above=-10 required=6.6 tests=[ALL_TRUSTED=-1.8, BAYES_00=-2.599] Received: from plato.miralink.com ([127.0.0.1]) by localhost (plato.miralink.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nrHuhGQ5ZUyd; Mon, 18 Aug 2008 15:19:34 -0700 (PDT) Received: from [10.0.0.40] (iago.office.miralink.com [10.0.0.40]) by plato.miralink.com (Postfix) with ESMTP id 68C3F1A90D4; Mon, 18 Aug 2008 15:19:34 -0700 (PDT) Message-ID: <48A9F735.5090507@miralink.com> Date: Mon, 18 Aug 2008 15:27:01 -0700 From: Sean Bruno User-Agent: Thunderbird 2.0.0.16 (X11/20080723) MIME-Version: 1.0 To: Dieter References: <200808182148.VAA27124@sopwith.solgatos.com> In-Reply-To: <200808182148.VAA27124@sopwith.solgatos.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Scott Long , freebsd-firewire@freebsd.org Subject: Re: Something broke :-( Re: fwcontrol update X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2008 22:27:02 -0000 Dieter wrote: > Am I correct in assuming that none of this stuff that > fwcontrol sets should carry across a reboot? And that > the firewire controller should get completely reset > by a reboot? > > My assumption is that no settings should survive a reboot. > I'm getting some bad results. Attempt to recover: > > Changed symlink from current fwcontrol to known working fwcontrol_prev. > Powered off camcorder. > Rebooted FreeBSD. > Powered on camcorder. > Ran fix_dv script to get FreeBSD into "non CYCLEMASTER mode". > fwcontrol -u 1 -f 0 > fwcontrol -u 1 -r > Start playing a tape (so I can run fwcontrol -R) > > Hrm ... the old code closed "fd" and then re-opened it. I have duplicated that behavior in the attached patch. > Needless to say, fwcontrol -R no longer works. > > I ran the fixit script again, and fwcontrol -S does work. > > I notice that it doesn't print every generation. > I notice that the node_id changes. > > This alarms me quite a bit. I didn't think there was anyway for the generation to change without the log message being spit out. Interesting. I have been suspicious of a race condition for some time in the firewire stack, I see it across multiple devices(sbp, sbp_targ) and now fwcontrol is acting weird. Very interesting. > FreeBSD 7.0 > AMD64 > fw controller: NEC uPD72871/2 > > Ideas? > Yes. Try the attached patch. Let me know. -- Sean Bruno MiraLink Corporation 6015 NE 80th Ave, Ste 100 Portland, OR 97218 Phone 503-621-5143 Fax 503-621-5199 MSN: sbruno@miralink.com Google: seanwbruno@gmail.com Yahoo: sean_bruno@yahoo.com