From nobody@FreeBSD.ORG Mon Aug 30 09:48:15 1999
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id 389F814C3B; Mon, 30 Aug 1999 09:48:15 -0700 (PDT)
Message-Id: <19990830164815.389F814C3B@hub.freebsd.org>
Date: Mon, 30 Aug 1999 09:48:15 -0700 (PDT)
From: colle@krtkg1.rug.ac.be
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@freebsd.org
Subject: pccards failing after resume
X-Send-Pr-Version: www-1.0

>Number:         13473
>Category:       kern
>Synopsis:       pccards failing after resume
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    imp
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 30 09:50:00 PDT 1999
>Closed-Date:    Wed Nov 14 22:58:14 MST 2001
>Last-Modified:  Wed Nov 14 22:58:34 MST 2001
>Originator:     Christophe Colle
>Release:        3.2-RELEASE
>Organization:
>Environment:
FreeBSD portable.is.cool 3.2-RELEASE FreeBSD 3.2-RELEASE #11: Mon Aug 30 16:51:21 CEST 1999     root@portable.is.cool:/usr/src/sys/compile/PORTABLE  i386

>Description:
On a Toshiba Satellite 210CT pccards are not working properly 
after a resume. FreeBSD cannot reassign a working configuration.

This used to work very well under FreeBSD-2.2.7


>How-To-Repeat:
use the following /etc/pccard.conf:
# Generally available IO ports
io      0x240-0x360
# Generally available IRQs (Built-in sound-card owners remove 5)
irq     10 11 13 15
# Available memory slots
memory  0xd4000  96k

#was 11
card "Option International" "V34bis GSM/PSTN Data/Fax Mode"
        config 0x23 "sio2" 11 
        insert echo Option inserted
        remove echo Option removed

#was 15
# 3Com Etherlink III 3C589D
card "3Com Corporation" "3C589D"
        config  0x1 "ep0" 9
        insert  echo 3Com Etherlink IIID inserted; 
        insert  /etc/pccard_ether ep0 192.168.1.2 up
        insert  /etc/pccard_ether ep0 alias 10.0.49.248 netmask 255.255.240.0 up
        remove  echo 3Com Etherlink IIID removed
        remove  /sbin/ifconfig ep0 delete ; /sbin/ifconfig ep0 delete


startup the laptop, and then suspand it, using the zzz command.
You will see that pccardd will sometimes fail to find the pcamcia cards:
an extract from my messages file:
Aug 30 12:47:04 portable /kernel: ep0: utp/bnc[*UTP*] address 00:60:08:83:a7:d9
Aug 30 12:47:15 portable /kernel: sio2: type 16550A
Aug 30 12:47:15 portable pccardd[60]: pccardd started
Aug 30 15:04:32 portable login: ROOT LOGIN (root) ON ttyv0
Aug 30 16:28:53 portable /kernel: ep0: unload
Aug 30 16:28:53 portable /kernel: Return IRQ=9
Aug 30 16:28:53 portable /kernel: Slot 0, unfielded interrupt (0)
Aug 30 16:28:54 portable /kernel: Card disabled, slot 0  
Aug 30 16:28:54 portable /kernel: sio2: unload,gone
Aug 30 16:28:54 portable /kernel: Return IRQ=11 
Aug 30 16:28:54 portable /kernel: Slot 1, unfielded interrupt (0)
Aug 30 16:28:54 portable /kernel: Card disabled, slot 1
Aug 30 16:28:54 portable /kernel: resumed from suspended mode (slept 00:00:20)
Aug 30 16:28:54 portable /kernel: Card inserted, slot 0
Aug 30 16:28:54 portable /kernel: Card inserted, slot 1
Aug 30 16:28:59 portable pccardd[60]: No free configuration for card 3Com Corporation
Aug 30 16:29:09 portable /kernel: sio2: type 16550A
Aug 30 17:07:32 portable reboot: rebooted by root



Here you clearly see that the 3com ethernet card is not detected properly again :-(

>Fix:
I'm not sure if I'm using the correct fix, but I'm using the following fix
which I will test the comming days if it's succesfull:

/usr/src/sys/pccard/pccard.c:
replace

        /*
         * Disable any pending timeouts for this slot since we're
         * powering it down/disabling now.
         */
        untimeout(power_off_slot, (caddr_t)slt, slt->poff_ch);


with
        /*
         * Disable any pending timeouts for this slot since we're
         * powering it down/disabling now.
         */
        /*
	Do actually power off the card...
        untimeout(power_off_slot, (caddr_t)slt, slt->poff_ch);
        */
        DELAY(1000);


>Release-Note:
>Audit-Trail:

From: Christophe Colle <christophe.colle@telenet.be>
To: freebsd-gnats-submit@freebsd.org, colle@krtkg1.rug.ac.be
Cc:  
Subject: Re: kern/13473: pccards failing after resume
Date: Wed, 01 Sep 1999 18:01:51 +0200

 Apparently the fix is not doing the job :-(
 Another solution is needed  ...
 

From: Christophe Colle <colle@pandora.be>
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: kern/13473: pccards failing after resume
Date: Mon, 20 Sep 1999 22:39:45 +0200 (MET DST)

 On Wed, 1 Sep 1999, Christophe Colle wrote:
 
 > Date: Wed, 01 Sep 1999 18:01:51 +0200
 > From: Christophe Colle <christophe.colle@telenet.be>
 > To: freebsd-gnats-submit@freebsd.org, colle@krtkg1.rug.ac.be
 > Subject: Re: kern/13473: pccards failing after resume
 > 
 > Apparently the fix is not doing the job :-(
 > Another solution is needed  ...
 > 
 
 I found out that I don't have this behavior when I remove the CDROM
 from my laptop... I wonder how I can debug what's happening at the
 moment when I suspend/resume the pc ...
 
 cc
 
 ---
 
 you type win, but you lose
 
 The Internet doesn't really need admins that are dumber than 
 the ones we have already.
 ----
 
 Christophe Colle
 
 Telenet, Liersesteenweg 4, 2800 Mechelen, Belgium
     tel:+32(0)15.333.981
     mailto:christophe.colle@telenet.be
     http://krtkg1.rug.ac.be/~colle
 
 
 
 
Responsible-Changed-From-To: freebsd-bugs->imp 
Responsible-Changed-By: imp 
Responsible-Changed-When: Mon May 15 23:10:29 MDT 2000 
Responsible-Changed-Why:  
Will see what's up with this.  Does it happen with -current? 
State-Changed-From-To: open->closed 
State-Changed-By: imp 
State-Changed-When: Wed Nov 14 22:58:14 MST 2001 
State-Changed-Why:  
No response from submitter qhen I reqwuested more data. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=13473 
>Unformatted:
