Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Feb 2009 14:02:28 +0000
From:      Bruce Cran <bruce@cran.org.uk>
To:        freebsd-usb@freebsd.org
Subject:   usb_reset, libusb20_compat01 and USB2
Message-ID:  <20090207140228.7d549c53@gluon>

next in thread | raw e-mail | index | archive | help
I've been working to port dfu-util, OpenMoko's USB DFU application, to
FreeBSD to work under USB2.  One problem I've found is that the device
starts out in Runtime Mode so dfu-util calls usb_reset to put it into
DFU mode; it seems to expect usb_reset to cause the system to detach
and reattach the device, but this doesn't happen.  As a result
usb_find_devices always returns 0 which triggers a warning; also,
since usb_reset causes the device to disappear on Linux dfu-util
doesn't call usb_close after resetting since the handle has become
invalid. A side-effect of this is that on FreeBSD a duplicate device
appears when doing a second enumeration pass.  Since dfu-util only
expects to see a single DFU-capable device it bails out, and it becomes
necessary to run it again for it to download the firmware (since the
phone is now already in DFU mode).

Is this a problem with the expectations of dfu-util, or should calling
usb_reset invalidate the device handle and cause the device to
re-attach?

-- 
Bruce Cran



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