usbftdi needs support for the SheevaPlug JTAG adapter
Usbftdi currently supports single-port USB-to-serial adapters based on the FTDI232R chip. Some of these chips support more than one port, using additional USB interfaces.
The SheevaPlug JTAG adapter is made by GlobalScaleTechnologies for use with their series of plug computers (see http://globalscaletechnologies.com/c-2-globalscale-technologies-products.aspx). It uses the same FTDI chip but with a different usb vendor/device id. It has two interfaces, the 1st one as JTAG and the 2nd one as serial console interface. Usbftdi should attach to the 2nd interface, while usb_mid should handle the first. This would allow libftdi (using libusb) to control the JTAG interface, so that JTAG tools like OpenOCD work as expected.
The changes necessary to support attaching usbftdi to the individual interfaces of a usb device are rather small. The interface number has to be used to calculate the physical port number, which then has to be used to set up parameters and baud rates. Already supported adapters should not be affected, as they only work on port 0 on interface 0. Other adapters using multiple interfaces could be easily supported with this change.
Updated by Hans Rosenfeld about 9 years ago
Webrev can be found here: http://grumpf.hope-2000.org/illumos-2881-webrev/
I took the liberty to add a few ASSERTs to make sure that portno is always 0 (only one port is supported by this driver). I also removed the portno argument from a few functions that didn't really need it.
I tested this with a SheevaPlug JTAG adapter connected to a DreamPlug. The serial console of the plug worked (the usbftdi part), and the JTAG adapter worked too (using OpenOCD, libftdi and usb_mid).