Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Sep 1998 10:28:22 +0100
From:      Brian Somers <brian@Awfulhak.org>
To:        Robert Watson <robert@fledge.watson.org>
Cc:        freebsd-bugs@FreeBSD.ORG, freebsd-mobile@FreeBSD.ORG
Subject:   Re: after wakeup from apm sleep: pccardd[46]: No free configuration for card 3... 
Message-ID:  <199809240928.KAA04905@woof.lan.awfulhak.org>
In-Reply-To: Your message of "Wed, 23 Sep 1998 13:40:13 EDT." <Pine.BSF.3.96.980923133349.479A-100000@sleipnir.pr3.watson.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
[cc'd to -mobile]

Short fix (sometimes works): kill & restart pccardd.

My machine's doing this too...

It looks like there's a problem with the slot power off code.  It 
waits a second (via timeout()) after the card has been removed before 
removing power.  This is a problem if the removal event is the result 
of a suspend as the timeout() doesn't wake up 'till *after* resuming. 
If the card is still there, sometimes the attach happens before the 
remove, resulting in the remove being untimeout()'d and pccardd 
thinking the driver entry is already in use.

The fix (which I plan to add in the next couple of days):

Add a new pointer called ah_final to struct apmhook (of the same type 
as ah_fun).  All drivers will set this to NULL when they initialise 
their hook.

Add a bit to the end of apm_execute_hook() (apm.c) that traverses the 
list again calling ah_final() if it's != NULL.

Add an ah_final() in pccard.c that untimeout()s power_off_slot, checks 
slt->power_off_pending, and if it's set, does the power_off_slot().

Any objections ?

> I am using an IBM 560E notebook with a 3com 3C589C ethernet card; the
> version of FreeBSD is 3.0-CURRENT.
> 
> uname -a reports:
> 
> FreeBSD sleipnir.watson.org 3.0-CURRENT FreeBSD 3.0-CURRENT #8: Mon Sep 21
> 14:00:31 EDT 1998
> robert@sleipnir.watson.org:/usr/src/sys/compile/SLEIPNIR-SB  i386
> 
> I have APM and pccard enabled in my kernel (config file below); however, I
> often get the following message on waking up the notebook after a sleep
> (with the card still in the slot): 
> 
> Sep 23 13:33:15 sleipnir /kernel: ep0: unload
> Sep 23 13:33:16 sleipnir /kernel: Return IRQ=10
> Sep 23 13:33:16 sleipnir /kernel: Slot 0, unfielded interrupt (0)
> Sep 23 13:33:16 sleipnir /kernel: Card disabled, slot 0
> Sep 23 13:33:16 sleipnir /kernel: resumed from suspended mode (slept
> 00:35:56)
> Sep 23 13:33:16 sleipnir /kernel: Card inserted, slot 0
> Sep 23 13:33:21 sleipnir pccardd[46]: No free configuration for card 3Com
> Corporation
> 
> The 'No free configuration' message is followed by the ep0 device no
> longer being usable -- attempts to use the interface result in a 'network
> down' error.  Needless to say, ifconfig reports:
> 
> ep0: flags=8803<UP,BROADCAST,SIMPLEX,MULTICAST> mtu 1500
>         ether 00:a0:24:60:31:9c 
> 
> The only way to get the device back seems to be to reboot.  Inserting
> 'PCIC_RESUME_RESET' removed a crash that used to happen in this situation,
> but I am still getting the no-free-configuration error.  Here is the
> kernel config file: 
[.....]

Yep.  When I made PCIC_RESUME_RESET a proper option a few weeks ago, 
I was running with a kernel with the above fix implemented.  I 
incorrectly thought that PCIC_RESUME_RESET solved the whole 
problem....

-- 
Brian <brian@Awfulhak.org>, <brian@FreeBSD.org>, <brian@OpenBSD.org>
      <http://www.Awfulhak.org>;
Don't _EVER_ lose your sense of humour....



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199809240928.KAA04905>