Thread-topic: Why is a Power Change delay needed only on iBook G4?
Our device seems to need a delay before sleep mode, but only on an iBook G4!
Without it, the iBook G4 would hang whenever it entered sleep mode.
Not other model is affected. This is quite a mystery to me.
When our device was attached to an iBook G4 running OSX 10.3.7, the Mac would hang whenever it entered sleep mode. It just stopped; no panic.log showed up. The light did not go into the slow-blink which normally indicates sleep, either. If I have bad code in my driver, shouldn't it trigger a panic?
I could not duplicate the problem on any other model of iBook, PowerBook or G4 I could find. Finally a borrowed an iBook G4 and found the problem occurred solidly. By attaching my device through two different hubs, USB 1.0 and USB 2.0, I discovered that it only happened with the EHCI controller in the iBook. Going through a hub did not fix it; as long as the device used the EHCI controller the iBook G4 failed.
Originally, setPowerState was returning IOPMAckImplied. When I changed that to 1,000,000 microseconds when powering down for sleep, the problem went away.
Then I had to give the iBook back.
Our device only has two power states: on and off. I don't know how many joules it needs to change state or anything. From my power management init code:
#define kNumberOfPowerStates 2
// Just2 power states::
// 0 OFF
// 1 all ON
static IOPMPowerState myPowerStates[kNumberOfPowerStates] =
{
{kIOPMPowerStateVersion1,0,0,0,0,0,0,0,0,0,0,0},
{kIOPMPowerStateVersion1,IOPMDeviceUsable,IOPMPowerOn,IOPMPowerOn,0,0,0,0,0,0,0,0}
};
m_PowerState = kNumberOfPowerStates-1;
PMinit(); // initialize superclass variables
// register ourselves with ourself as policy-maker
if (pm_vars != NULL)
{
registerPowerDriver(this, myPowerStates, kNumberOfPowerStates);
provider->joinPMtree(this); // attach into the power management hierarchy
changePowerStateTo(m_PowerState);
}
Why do I need a delay, but only on the EHCI in an iBook G4?
Harland Harrison
2Wire.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/usb/email@hidden
This email sent to email@hidden