Re: Sample Code kextunload error
Re: Sample Code kextunload error
- Subject: Re: Sample Code kextunload error
- From: Garth Cummings <email@hidden>
- Date: Fri, 11 Apr 2003 09:41:43 -0700
Hi Eric,
On Thursday, April 10, 2003, at 09:12 AM, Eric Ng wrote:
Hi,
I am looking into the audio kernel driver recently and tried with
the SamplePCIAudioDriver sample code. I compiled and be able to load
the
kext successfully, unloading also successful. However, after i open
ioreg to
check its existance, unloading the kext would return error
(0xdc004002). Do
anyone know why?
To figure out what any I/O Kit error means, you can refer to Technical
Q&A 1075:
<
http://developer.apple.com/qa/qa2001/qa1075.html>.
Decoding this error yields:
0xdc004002: sys=0x37 sub=0x1 code=0x2
A quick search of the Kernel.framework headers with grep found this in
Kernel.framework/Headers//libkern/OSReturn.h. Further decoding yields:
sys_libkern | sub_libkern_metaclass | kOSMetaClassHasInstances
So this error means that at least one instance of your driver still
exists.
With hot-pluggable buses like USB and FireWire, removing the device
will release the last instance of the driver, allowing it to be
unloaded. Unfortunately, PCI isn't hot-pluggable on our systems, so
your development cycle will need to consist of kextload, run, crash,
reboot.
I change the IOPCIDevice matches to 0x00000000&0x00000000
to sigal matches to all available pci device. I am using IOAudiofamily
1.3.4
Eric
You might want to subscribe to the darwin-drivers mailing list. That's
where the PCI folks hang out.
Hope this helps,
--gc
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.