Hello, On Thu, Sep 11, 2014 at 12:56:26PM +0800, Xiaofan Chen wrote: > On Thu, Sep 11, 2014 at 12:50 PM, Xiaofan Chen <[email protected]> wrote: > > > > Actually easy, Option 3 is the best. You can remove the > > libusb_set_configuration > > under all OS (using libusb-1.0 API). The only time usb_set_configuration > > is required is when using libusb-win32 under Windows (libusb-0.1 API). > > > > A bit more details here. Under Linux and Mac OS X, the set_configuration > is not required since the driver already sets the default configuration and > I believe all the current supported adapters are okay with the default > configuration (very few device has two configurations).
To add a bit to the picture regarding Linux: During the probe a usb_generic_driver is used which has some logic to select an appropriate (more likely to be suitable) config. See [1] (usb_choose_configuration()) for details. It's also clear from the kernel source that if one attempts to set an already selected configuration it'll be treated as lightweight reset (which is apparently exactly what LPC Link2 firmware doesn't like). Anders, could you please post full "lsusb -v" output for your LPC Link with JLink firmware? Can someone with original JLink and JLink OB do the same please so we can be sure all of the devices have only one configuration anyway? Xiaofan, do I understand it right that basically the same applies to FreeBSD, NetBSD and OpenBSD as well, i.e. that it's likely we should fully drop set_configuration call regardless of the OS and particular JLink implementation? [1] http://lxr.free-electrons.com/source/drivers/usb/core/generic.c#L43 [2] http://lxr.free-electrons.com/source/drivers/usb/core/devio.c#L1270 -- Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software! mailto:[email protected] ------------------------------------------------------------------------------ Want excitement? Manually upgrade your production database. When you want reliability, choose Perforce Perforce version control. Predictably reliable. http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
