Skip to contentSkip to conversation

2.5.69+bk: "sleeping function called from illegal context" on card release while shutting down

DISCUSSION Alex Riesen 1 participant 1 message May 13, 2003 Network drivers

lore
Share & tools
lore
#0 lore raw

Thanks Paul,

your last suggestion (pcnet_close) helped. The previous patch was not enough, of course.
I tried hard to reproduce it, and almost broke the card. No "wrong sleepers" seen anymore.

Someone still has to remove the timer. It is not used anymore, in this file, at least.

-alex

drivers/net/pcmcia/pcnet_cs.c +2 -2
@@ -848,7 +848,7 @@ static int pcnet_event(event_t event, in
 	link->state &= ~DEV_PRESENT;
 	if (link->state & DEV_CONFIG) {
 	    netif_device_detach(&info->dev);
-	    mod_timer(&link->release, jiffies + HZ/20);
+	    pcnet_release(link);
 	}
 	break;
     case CS_EVENT_CARD_INSERTION:
@@ -1054,7 +1054,7 @@ static int pcnet_close(struct net_device
     netif_stop_queue(dev);
     del_timer(&info->watchdog);
     if (link->state & DEV_STALE_CONFIG)
-	mod_timer(&link->release, jiffies + HZ/20);
+	pcnet_release((u_long)link);
 
     return 0;
 } /* pcnet_close */