As the firmware actually crashes with the Linux usbtmc driver, I've
spent some (far too much) time on trying to get it working.
There is a branch over at GitHub:
https://github.com/tommie/linux/blob/usbtmc-rigol/drivers/usb/class/usbtmc.c
I've interpreted the USBTMC specs differently from the original
authors of the Linux and Agilent drivers. It seems stable and hasn't
resulted in any crash (host or device ;) or truncated data so far.
What differs from before is that I issue a single Bulk-IN request, but
then read multiple times. It shouldn't make a difference as long as
userspace always requests as least as many bytes as will be available.
We are as bad as we were before communicating EOM to userspace, but
now the caller has more control over what is sent OTW.
From various sources, I see that people using libusb always read more
than the device would return, thus avoiding the USB bugs of the
firmware.
I'll squash some commits and submit to LKML for review at some point.