Dear Experts,
I have some code using usbdevice_fs that calls the USBDEVFS_DISCONNECT
and USBDEVFS_CONNECT ioctls to remove and re-connect any kernel drivers
when it starts and finishes. This works OK.
The only problem is if the program terminates abnormally (crash,
ctrl-C, OOM etc); USBDEVFS_CONNECT is not called. Is there any way to
get USBDEVFS_CONNECT behaviour automatically when the fd is closed? I
think that I could do this from a signal handler for some cases, but
I'd really like it to happen even for un-catchable signals.
Related to this, what about configurations? If I have set the
configuration to a different one than the kernel chose, when I call
USBDEVFS_CONNECT I think the kernel will not change it back and instead
try to bind drivers to the current configuration's interfaces
(right?). That might not be what I want (though I'm not sure). So is
there a way to do USBDEVFS_CONNECT that also resets the configuration
to the kernel's default choice?
Thanks for any suggestions.
Phil.
--
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