Re: 2.5.69+bk: "sleeping function called from illegal context" on

Paul Fulghum (paulkf@microgate.com)
13 May 2003 10:31:01 -0500


On Tue, 2003-05-13 at 09:58, Felipe Alfaro Solana wrote:
> On Tue, 2003-05-13 at 15:57, Alex Riesen wrote:
> > Just tried to eject the card while the system was shutting down.

> Don't know if this is fixed by latest Russell patches, but vanilla and
> -bk snapshots do *not* contain the latest PCMCIA/CardBus code. Is it
> possible for you to try 2.5.69-mm4?

Russell's patches do not address this.

Individual PCMCIA drivers need to be updated to call
thier release function directly when processing a
CARD_RELEASE message instead of from a timer procedure.

Similar to this patch for synclink_cs.c:

diff -u -4 -r4.9 synclink_cs.c
--- synclink_cs.c 2003/05/08 19:26:53 4.9
+++ synclink_cs.c 2003/05/13 15:29:15
@@ -814,9 +814,9 @@
case CS_EVENT_CARD_REMOVAL:
link->state &= ~DEV_PRESENT;
if (link->state & DEV_CONFIG) {
((MGSLPC_INFO *)link->priv)->stop = 1;
- mod_timer(&link->release, jiffies + HZ/20);
+ mgslpc_release((u_long)link);
}
break;
case CS_EVENT_CARD_INSERTION:
link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;

The timer link->release is initialized with the release
function (in this case mgslpc_release, but called something
else in your driver). Now it is called directly.

-- 
Paul Fulghum, paulkf@microgate.com
Microgate Corporation, http://www.microgate.com

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/