-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
I run st-util as a long-running daemon to interface with a sensor monitoring project. About once a month, the USB spontaneously resets, and then strace on st-util shows it is repeatedly failing:
ioctl(9, USBDEVFS_SUBMITURB, 0x8e35bd0) = -1 ENODEV (No such device)
And, for example, 'm' (gdb remote read memory) commands silently fail and simply return stale data that happens to sit in a buffer.
I haven't investigated in detail yet but my assumption is that libusb is returning an error code that gets lost at some point.
For my purposes, it would be most convenient if st-util were simply to re-connect to the USB, but I imagine other people would find that behavior kind of objectionable (state would change without gdb necessarily being informed). So I figure the proper answer is for st-util to simply terminate when the USB device goes away. (comments?)
So I will be submitting a patch "soon" to achieve that effect.