Differences between sources 308 and 314
New
CODE
if (!_uimInitialized)
{
// set the reset bit, but only if we are not currently initialized
About PCCard
CODE
if (_controllerAvailable && !_wakingFromHibernation && !_pcCardEjected && (GetRootHubStatus((IOUSBHubStatus *)&tempStatus) == kIOReturnSuccess))
About link and unlink
CODE
// 3-4-08 rdar://5779996
// it is possible that the unlink above has zerod out _AsyncHead, and the link code won't automatically set it back
// so do that the same way we always do, at least until we solve rdar://5779967
// this code is copied from a different place
if (_AsyncHead)
{
// 5664375 - only need to do the following if the Async list is enabled in the CMD register
if (CMD & kEHCICMDAsyncEnable)
About Power state
CODE
AppleUSBHub::setPowerState ( unsigned long powerStateOrdinal, IOService* whatDevice )
{
// 5654850 - this used to be done in powerStateWillChangeTo. however, that was too early, so we moved it to HubPowerChange, which is the call
// which gets made from the superclass when a setPowerState comes in.
// however, the superclass implementation will short-circuit that call if we are being terminated, so now we do it just before
// the superclass::setPowerState. this makes it work much better when a hub in low power mode gets disconnected
About deadcheck
CODE
if ( thread_call_enter(_hubDeadCheckThread) == TRUE )
{
USBLog(3, "AppleUSBHub[%p]::CallCheckForDeadHub _hubDeadCheckThread already queued", this);
DecrementOutstandingIO();
}
About busy device
QUOTE
// before issuing a Synchronous terminate, we need to make sure that the device is not busy
while (cachedPortDevice->getBusyState() && retries--)
{
// wait up to 10 seconds for the device to get un-busy
USBLog(2, "AppleUSBHubPort[%p]::RemoveDevice - device(%p)[%s] busy - waiting 100ms (retries remaining: %d)", this, cachedPortDevice, cachedPortDevice->getName(), (int)retries);
IOSleep(100);
}
if (cachedPortDevice->getBusyState())
{
USBError(1, "AppleUSBHubPort: Port %d of Hub at %p about to terminate a busy device (%s) after waiting 10 seconds", _portNum, (void*)_hub->_locationID, cachedPortDevice->getName());
}
And so on.
It means latest kext is not final solution. The latest sources 314 are better.
They are not intended only for 10.5.3. They are simply more correct sources.