|
From: Karl S. <0x...@gm...> - 2024-06-29 21:22:13
|
On Sat, Jun 29, 2024 at 17:01 Tim Roberts <ti...@pr...> wrote: > Dean Sands wrote: > > Tried a dumb thing. > > The device I'm getting from the hotplug arrival event isn't usable. > > I open a handle and make a few token attempts to claim the interface. > > When that fails I close the handle. > > Then I search for the device again and connect to that. > > Are you saying you got it to work? > > In general, as soon as you know a device is unusable, you should close > the handle. As long as your handle remains open, the kernel cannot > clean up the remnants of the previous instance, and that can cause > confusing problems and duplicate instances. I vaguely recall the problem of engaging a reconnected device without restarting the app may have been outstanding for years. If this is the problem and workaround, it would ideally be documented somewhere in such a way that more applications emerge supporting reconnection. I imagine it would help legacy applications a lot to add code that cleans things up enough to recreate a device the first time it becomes unusable. |