Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 07 Sep 2011 12:12:03 -0400
From:      "Dieter BSD" <dieterbsd@engineer.com>
To:        freebsd-firewire@freebsd.org
Subject:   Re: fwcontrol -R is broken
Message-ID:  <20110907161204.43270@gmx.com>

next in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110907161204.43270>