How to let the system take over a device after the DriverKit process exits?

I have created a USB filter using Mac DriverKit, but the filter is unable to retrieve configuration information during startup.

After the USB filter has started and registered the service, my app can send the configuration information to the filter. Therefore, I would like to know if there is a way to exit the USB filter and allow the system to take control of the USB device once the filter has exited.

I have tried calling Terminate(0), but it did not work as even after the USB filter exited, the Finder still couldn't display the USB device.

After the USB filter has started and registered the service, my app can send the configuration information to the filter. Therefore, I would like to know if there is a way to exit the USB filter and allow the system to take control of the USB device once the filter has exited.

What are you trying to do, and are you sure DriverKit is the right answer? If you only need temporary control of a device, the IOUSBHost framework is generally the better approach.

I have tried calling Terminate(0), but it did not work, as even after the USB filter exited, the Finder still couldn't display the USB device.

I'd need to see the I/O Registry state to be sure, but I think this will end up leaving your device in its previous state without loading anything "new.” I think what you'd need to do is close out any connections to the device, call "Reset,” then make sure you don't take control of the device; however, I haven't looked at this closely enough to be sure. Again, my actual recommendation would be to use IOUSBHost, which takes care of all of this.

__
Kevin Elliott
DTS Engineer, CoreOS/Hardware