I am having problems with the unloading of an IOKit Driver and I need some guidance as to the correct method to solve it. The driver is based off the same code, so we only have the standard functions: init, free, probe, start & stop The problem we're running into is that the user can call kextunload on our IOKit, which calls the stop method. Our code recognizes that the application is still using the driver and fails, and we never call the super::stop method. Unfortunately the IOServices removes our driver from the IORegistry, and when the user then tries to reload the driver with kextload bad things go amuck.... Forget the fact that this is an edge-case senario, and I know the minute the user starts using kextunload, we don't really have to play nice, but I want to play nice. We don't unload, which I thought was enough, but now I have to figure out how to stop IOServices from removing us from the IORegistry. Is there a routine I need to be calling or some message I need to be listening for? Sample code? Thanks. Brad =3D=3D=3D=3D< my code snippet >=3D=3D=3D=3D=3D void mykextclass::stop(IOService *provider) { kern_return_t result =3D KERN_SUCCESS; IOLog("Stopping\n"); result =3D mydriver(provider); if (result =3D=3D KERN_SUCCESS) super::stop(provider); } _______________________________________________ darwin-kernel mailing list | darwin-kernel@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-kernel Do not post admin requests to the list. They will be ignored.