Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PCIATA driver matching



I'm fudging with a ATA PCI adapter here, and there's something regarding the IOKit ATA family that
I don't quite follow. The hardware is a 2 channel ATA/100 PCI card. So I wrote 2 classes:

com.bleh.ata.controller derived from IOService whose requested provider is a IOPCIDevice.
com.bleh.ata.driver derived from IOPCIATA whose requested provider is a com.bleh.ata.controller.

The .controller class uses the standard IOPCIMatch against the vendor/device id. Once the match
happens, it creates .driver nubs, one per channel, calls the init function on the .driver, attaches the nub
to the .controller class, and finally calls registerService on the nub.

So far so good. The problem is that after running it, the start() function on the .driver never happens,
as if nothing is matched against it. So I end up with a IO registry like this:

+--- pci1234,12 <class IOPCIDevice>
{ ... }
|
+--- com.bleh.ata.controller <class com.bleh.ata.controller>
{ ... }
|
+ --- com.bleh.ata.driver <class com.bleh.ata.driver>
| { ... }
+ --- com.bleh.ata.driver <class com.bleh.ata.driver>
{ ... }

So, my question is what do I need to match the 'com.bleh.ata.driver' against so it gets started and I get to
spawn the IOATADevice nubs? Can it be anything? What is anything? Can I call start() directly?

Oh, one bug? I found while writing this is that when calling the init() function on my .driver class, after
creating an instance of it with 'new', if I try to IOLog( "%s init", getName() ); as the first piece of code on the
init() routine, it will cause a kernel panic everytime. The culprit being getName() for some reason.

TIA,
Ernesto.
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.