On Sat, 21 Jul 2018, Urja Rannikko wrote: > Hi, > > This device presents itself as an USB CD Drive, and extends that > "metaphor" (kinda) to how it transfers data (= ethernet frames in our > case) between hosts. That is one SCSI vendor command (0xD8) over > bulk-only mass-storage is used to poll whether data is available and > another one (0xD9) is used to transfer the data. Yes, this is not good > but the hardware is what it is. > > The question is, if i were to implement a driver for this, which is > the better option: > 1) Make a driver that (ab)uses the kernel SCSI and usb mass storage > drivers to do the transfers. > or > 2) Make a driver that contains a minimal set of usb mass storage bulk > transfer code to do what is needed for this device. This depends on whether you want to expose the CD interface. If you don't care about it, I recommend option 2. If you do want the CD interface, I recommend option 1. > If you answer 1, I'd like to know the appropriate API layer to hook > into, and how to probe for the device and such... Write a subdriver for usb-storage. See the various subdrivers already in the drivers/usb/storage directory for examples. Alan Stern > Second case is in many ways much simpler (though I'm not sure if i > need to detach the mass storage driver from the device in some way), > but duplicates some amount of code. > > Please CC me in any replies to this thread. > > Extra context information: > I bought this device for cheap expecting it to work as an usb network > cable in linux. It doesn't, but if i have the spare cycles i might > just make it happen. I found a driver online for windows 7 that makes > it present the cable as a "virtual" network card, and I was able to > capture usb traces from that already. The usb ID is 0ea0:2108, though > the windows driver also supports some other OTi host-to-host chips > (like the apparently newer 2208) so maybe one day a linux driver might > too... > > (This message was already sent to the LKML, but i got a suggestion to > try here, so sorry if you got it twice.) -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html