libftdi Archives

Subject: Re: patch to libftdi-1.0 git head, fix opening of multiple devices

From: Xiaofan Chen <xiaofanc@xxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Tue, 22 Jan 2013 12:56:17 +0800
On Fri, Jan 18, 2013 at 5:49 AM,  <derRolf@xxxxxxxxxxxxxx> wrote:
> thanks for your thoughts. Yes, we have our own VID/PID. However, our
> software needs to operate multiple devices with the same VID/PID
> (multi-threaded). The only difference between the devices is the serial
> number, which is unique for each device. We have settings and configuration
> data for the devices, which applies to the specific device (i.e. serial
> number). Depending on the serial number (i.e. device type) we boot different
> FPGA bitstreams.

This same VID/PID thingy seems to be quite popular among FTDI
device, one example is Amontec Jtag debuggers, they have
a few device (some of them full-speed, some of them high speed)
but all of them share the same VID/PID. I asked why and the reason
is that they have a WHQL driver (FTDI drivers modified to use their
own PID) and they do not want to break the WHQL signature by
adding another PID. And WHQL process takes time and money.

> Actually I don't think any application could be broken by the patch. If the
> device is not found, the code still returns the error. It's just that right
> now the search for the device ends if another device that comes first in the
> list has already been opened. From my point of view this is a bug (but one
> that only happens if you play with multiple devices from the same process).
>
> I understand that you don't want to apply any changes before the 1.0
> release. That's fine, I don't use the release code but the git head. But it
> would be good if the patch could be applied after the release is out. Right
> now we have patched our git clone and are merging on each pull from
> upstream.

I think this patch is good to have post 1.0 release. But before merging,
it needs more testing.

-- 
Xiaofan

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread