[PATCH] main: Print interface information after it has been filled in
stefan at datenfreihafen.org
Mon May 23 20:17:19 CEST 2011
On Fri, 2011-05-20 at 16:28, Stefan Schmidt wrote:
> On Thu, 2011-05-19 at 23:42, Tormod Volden wrote:
> > From: Tormod Volden <debian.tormod at gmail.com>
> > First get_first_dfu_device() fills in the dev and dev_handle
> > members, but only after get_first_dfu_if() the whole interface
> > information is filled in.
> > Signed-off-by: Tormod Volden <debian.tormod at gmail.com>
> > ---
> > This solves the "Found Runtime: [0000:0000]" issue I tried to address
> > in the "main: Populate the final interface structure before printing it"
> > patch that I posted and withdrew in February.
> > It also solves the segfaults we are seeing on the libusb-1.0 branch.
> Thanks for working on this.
> Sadly a problem on the freerunner persists in the libusb-1.0 branch
> even with this patch applied. Trying to donwload something just dies
> without segfault and leaves the following in dmesg:
> [1285088.771326] dfu-util general protection ip:4027f6 sp:7fffc6d2a610 error:0 in dfu-util[400000+6000]
> I know you don't have an freerunner so I will try to chase this down
> the next days. Its the last blocker for getting the libusb-1.0 branch
> merged into master.
I spent some time on this at the weekend. It actually did work before
in the libusb-1.0 branch. Your commit that fixed your device broke it
for the freerunner:
Author: Tormod Volden <debian.tormod at gmail.com>
Date: Thu Feb 3 23:12:35 2011 +0100
main: Use the config descriptor value, not the index
Its libusb_get_config_descriptor_by_value() in print_dfu_if thats
failing and thus the cfg being not populated. As you observed
I have several band aids but no real solution for now:
1) Simply comment out print_dfu_if() to avoid the problem for now.
Thats not to bad I think as it "just" gives some more info to the
terminal but is not needed for the actual flashing.
2) Leave print_dfu_if() but add some error checking around
libusb_get_config_descriptor_by_value() and return if fails. Will
result in the same loss of information but not function as 1. A bit
better as we should check for errors anyway. :)
3) Use find_dfu_if(dif->dev, print_dfu_if, NULL); instead of the
simple print_dfu_if() here. Thats works but prints all available
interfaces (5 or 6 on the freerunner) and not only the one we are
flashing to. Not that nice imho.
The option we always have is of course leaving it as is and trying to
pin the root cause down before merging the libusb-1.0 branch into
While I feel its about time doing so I'm not in a real hurry. Just my
time is a bit spare for the debugging.
More information about the devel