| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
I've worked out my issues with trying to talk to hardware, so I've set my sights on creating all the other objects an ethernet driver needs to work._______________________________________________
When I call the following code, getOutputQueue always returns zero. This doesn't make sense since this is exactly the same way AppleInteli82557, AppleBMACEthernet, and AppleGMACEthernet all do it. What gives? The docs don't explain what conditions might exist that would cause this failure.
Output is always:
Mar 25 23:18:01 12-247-44-84 mach_kernel: transmitQ is zero
cr
bool com_chuck_iokit_tulip::_initDriverObjects()
{
bool ret = false;
do {
// This driver will allocate and use an IOGatedOutputQueue.
transmitQueue = OSDynamicCast(IOGatedOutputQueue, getOutputQueue(
)
);
if ( ! transmitQueue) { IOLog("transmitQ is zero\n"); break; }
// snipped other code...
} while (false);
return true;
}
bool com_chuck_iokit_tulip::start(IOService *provider)
{
bool ret = false;
do {
IOLog("Starting\n");
pciNub = OSDynamicCast(IOPCIDevice, provider);
if ( !pciNub || !super::start(provider)) break;
pciNub->retain();
if ( ! pciNub->open(this)) break;
if (! _initDriverObjects()) break;
// snipped other code...
} while (false);
return true;
}
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
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.