From owner-freebsd-firewire@FreeBSD.ORG Wed Sep 7 16:12:17 2011 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 9B931106566C for ; Wed, 7 Sep 2011 16:12:17 +0000 (UTC) (envelope-from dieterbsd@engineer.com) Received: from mailout-us.mail.com (mailout-us.gmx.com [74.208.5.67]) by mx1.freebsd.org (Postfix) with SMTP id 5F2308FC08 for ; Wed, 7 Sep 2011 16:12:17 +0000 (UTC) Received: (qmail 7310 invoked by uid 0); 7 Sep 2011 16:12:06 -0000 Received: from 67.206.187.57 by rms-us017 with HTTP Content-Type: text/plain; charset="utf-8" Date: Wed, 07 Sep 2011 12:12:03 -0400 From: "Dieter BSD" Message-ID: <20110907161204.43270@gmx.com> MIME-Version: 1.0 To: freebsd-firewire@freebsd.org X-Authenticated: #74169980 X-Flags: 0001 X-Mailer: GMX.com Web Mailer x-registered: 0 Content-Transfer-Encoding: 8bit X-GMX-UID: u+IOfape33erJQ7YAmtn2JAjL0tsZs38 Subject: Re: fwcontrol -R is broken 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: Wed, 07 Sep 2011 16:12:17 -0000 Hi Sean, > Please try this patch sooner rather than later.  I'd like to get it > patched pre-9.0 at a minimum if this resolves the issues. I added your patch to the 8.2 sources and compiled it in a 7.1 chroot in hopes of avoiding a kernel panic. It printed out some garbage.  I looked at the code a bit and added the following:        char *recv_data = NULL;        char *send_data = NULL; +       /* debug */ +       snprintf(devbase, sizeof(devbase), "ERROR: variable devbase is uninitialized "); +        if (argc < 2) {                for (current_board = 0; current_board < MAX_BOARDS; current_board++) {                        snprintf(devbase, sizeof(devbase), "%s%d.0", device_string, current_board); Now I get: ./fwcontrol -R /tmp/foo.dv fwcontrol: main: Error opening firewire controller #0 ERROR: variable devbase is uninitialized  in recv_data detect: No such file or directory Note: I didn't have to turn on the camcorder to get this far. For full testing it might be possible to connect two controllers together and do fwcontrol -S on one and fwcontrol -R on the other, avoiding the need for a camcorder or similar DV device. ----- IIRC someone changed fwcontrol awhile back so that the order of arguments isn't supposed to matter anymore?  If so it isn't working: ./fwcontrol -u 0 -R /tmp/foo.dv     fwcontrol: main: Error opening firewire controller #0 ERROR: variable devbase is uninitialized  in recv_data detect: No such file or directory ./fwcontrol -R /tmp/foo.dv -u 0 fwcontrol: detect_recv_fn: error reading from device: Resource temporarily unavailable The "error reading from device" is probably due to the camcorder not being on.  Rearranging the args got it working a few days ago. But this is just a FYI, not a suggestion that someone wade into improving fwcontrol's arg handling. I can live with having to arrange the args in a particular order. I can live with having to compile fwcontrol in a 7.1 chroot. But kern/113785 is a big problem with no workaround.  :-( So 113785 is the bug I really need a fix for.