From owner-freebsd-mobile Thu Sep 24 10:26:14 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA06203 for freebsd-mobile-outgoing; Thu, 24 Sep 1998 10:26:14 -0700 (PDT) (envelope-from owner-freebsd-mobile@FreeBSD.ORG) Received: from awfulhak.org (awfulhak.force9.co.uk [195.166.136.63]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA06069; Thu, 24 Sep 1998 10:25:48 -0700 (PDT) (envelope-from brian@Awfulhak.org) Received: from woof.lan.awfulhak.org (brian@woof.lan.awfulhak.org [172.16.0.7]) by awfulhak.org (8.8.8/8.8.8) with ESMTP id SAA14390; Thu, 24 Sep 1998 18:25:39 +0100 (BST) (envelope-from brian@Awfulhak.org) Received: from woof.lan.awfulhak.org (brian@localhost [127.0.0.1]) by woof.lan.awfulhak.org (8.9.1/8.9.1) with ESMTP id KAA04905; Thu, 24 Sep 1998 10:28:25 +0100 (BST) (envelope-from brian@woof.lan.awfulhak.org) Message-Id: <199809240928.KAA04905@woof.lan.awfulhak.org> X-Mailer: exmh version 2.0.2 2/24/98 To: Robert Watson cc: freebsd-bugs@FreeBSD.ORG, freebsd-mobile@FreeBSD.ORG Subject: Re: after wakeup from apm sleep: pccardd[46]: No free configuration for card 3... In-reply-to: Your message of "Wed, 23 Sep 1998 13:40:13 EDT." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 24 Sep 1998 10:28:22 +0100 From: Brian Somers Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org [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 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 , , Don't _EVER_ lose your sense of humour.... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message