Mailing Lists: Apple Mailing Lists

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

Re: PCMCIA Race condition after sleep



matthew,

the IOPCCardFamily did not change between 10.2.3 and 10.2.4, but I have also started receiving reports of things being broken on 10.2.4 that worked on 10.2.3. :-(

There has been a long standing issue with power management that it does not coordinate its actions with the inserting and removing of cards. Normally, this is not an issue unless you are trying insertions/removals during sleep. I have been telling driver writers that they need to guard against this by keeping track of what state they are in so that they know when to ignore/stall requests from system that don't make sense. This also applies to incoming user requests and device interrupts, it is also possible to get either of these while you are still in state of being powered off.

My guess is that something has changed in the timing of the system that has widen one of these "holes" in your driver.

-rick

On Monday, February 24, 2003, at 06:41 AM, Matthew T. Russotto wrote:

I have a PCMCIA driver for a network adapter, and I've noticed a race condition as follows:

1) Put machine to sleep
2) Wake machine up.
3) Insert card while machine is in the midst of waking up
4) The driver's "start" routine is called, and at some point the driver's "registerWithPolicyMaker" routine is called
5) registerWithPolicyMaker calls policyMaker->registerPowerDriver(this, myPowerStates, myPowerStateCount)
6) Before that call returns, the driver's setPowerState is called with a power state of 0 (device off)
7) setPowerState is not called again.

At this point, the device is an unusable state. Worse, because the driver thinks the device is unsafe to access, it's not servicing interrupts and the system grinds to a halt constantly responding to interrupts which don't get serviced.

Worse, I have a report that in 10.2.4 (my development system is 10.2.3) this occurs every time the system is woken with the card in -- instead of getting setPowerState calls, the system unloads and reloads the driver.

Have I find a legitimate bug here, or am I doing something wrong? Any workarounds/fixes suggested?
_______________________________________________
darwin-drivers mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-drivers
Do not post admin requests to the list. They will be ignored.

__
rick sulack
darwin core os group
apple computer, inc
--------------------------------------------------------------
"More computing sins are committed in the name of efficiency (without necessarily achieving it)
than for any other single reason - including blind stupidity" -Wulf 1972
_______________________________________________
darwin-drivers mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-drivers
Do not post admin requests to the list. They will be ignored.
References: 
 >PCMCIA Race condition after sleep (From: "Matthew T. Russotto" <email@hidden>)



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.