probe() method alternative in DriverKit USB

I need to migrate functionality previously implemented in a kext probe() function to DriverKit. However, I am unable to find an equivalent method.

The probe() method was used to tighten the matching criteria over that possible with the Info.plist, by performing additional checks on USB configuration data.

I can implement this in the driver's Start() method, returning an error if the additional USB checks fail. However, this appears to leave the driver instance in a broken state - for example, the driver's free() method is never called to release resources allocated in init().

What is the correct way to implement probe() functionality in DriverKit?

I can implement this in the driver's Start() method, returning an error if the additional USB checks fail. However, this appears to leave the driver instance in a broken state - for example, the driver's free() method is never called to release resources allocated in init().

This is correct, but you need to manually call Stop instead of just failing.

Thanks for the quick reply - that indeed solves the problem!
probe() method alternative in DriverKit USB
 
 
Q