NetBSD Problem Report #21838
Received: (qmail 23669 invoked by uid 605); 10 Jun 2003 03:21:15 -0000
Message-Id: <200306100321.h5A3L5KJ016222@l236227.ap.plala.or.jp>
Date: Tue, 10 Jun 2003 12:21:05 +0900 (JST)
From: itohy@netbsd.org
Sender: gnats-bugs-owner@netbsd.org
Reply-To: itohy@netbsd.org
To: gnats-bugs@gnats.netbsd.org
Subject: "panic: cardbus_get_capability" on apm resume when CardBus tlp(4) was running
X-Send-Pr-Version: 3.95
>Number: 21838
>Category: kern
>Synopsis: "panic: cardbus_get_capability" on apm resume when CardBus tlp(4) was running
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jun 10 03:22:00 +0000 2003
>Closed-Date:
>Last-Modified: Sat Jul 24 14:39:00 +0000 2004
>Originator: ITOH Yasufumi
>Release: NetBSD 1.6L
>Organization:
>Environment:
System: NetBSD pino.my.domain 1.6L NetBSD 1.6L (PINO) #380: Mon Jun 9 20:33:32 JST 2003 itohy@pino.my.domain:/remote/fmv.w/src/sys/arch/i386/compile/PINO i386
Architecture: i386
Machine: i386
related dmesg:
cbb0 at pci0 dev 19 function 0: Toshiba ToPIC95B CardBus-PCI Bridge (rev. 0x07)
cbb1 at pci0 dev 19 function 1: Toshiba ToPIC95B CardBus-PCI Bridge (rev. 0x07)
cbb0: interrupting at irq 11
cardslot0 at cbb0 slot 0 flags 0
cardbus0 at cardslot0: bus 20 device 0
pcmcia0 at cardslot0
cbb1: interrupting at irq 11
cardslot1 at cbb1 slot 1 flags 0
cardbus1 at cardslot1: bus 21 device 0
pcmcia1 at cardslot1
:
tlp0 at cardbus1 dev 0 function 0: DECchip 21143 Ethernet, pass 4.1
tlp0: Ethernet address xx:xx:xx:xx:xx:xx
ukphy0 at tlp0 phy 1: Generic IEEE 802.3u media interface
ukphy0: OUI 0x000818, model 0x0021, rev. 2
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
tlp0: 21143 reset block
tlp0: unknown ISV media block type 0x06
tlp0: interrupting at 11
>Description:
If CardBus tlp card is running (ifconfig up),
suspending and resuming the system causes a panic.
panic: cardbus_get_capability
Begin traceback...
_cardbus_get_capability(c05c3a00,c039bb8c,80150000,1,c690fde8) at _cardbus_get_capability+0x5f
_tlp_cardbus_setup(c06fd000,c05c3a00,c60f3000,c02fce0f,c0580800) at _tlp_cardbus_setup+0x79
_tlp_cardbus_power(c06fd000,0,18,c0300e8d,c06e9160) at _tlp_cardbus_power+0x31
_tlp_power(0,c06fd000,90607d3,2b370b01,c05c2400) at _tlp_power+0x70
_dopowerhooks(0,3,c690feac,c030fc5a,3ee3e0ab) at _dopowerhooks+0x30
_apm_resume(c05c2400,c690ff2c,246,10,c05c2400) at _apm_resume+0x34
_apm_event_handle(c05c2400,c690ff2c,1,c039d76c,0) at _apm_event_handle+0x10e
_apm_periodic_check(c05c2400,0,c690ff8c,c0310c65,c05c245c) at _apm_periodic_check+0xb0
_apm_thread(c05c2400,0,0,0,c010032e) at _apm_thread+0x26
End traceback...
syncing disks... wd0g: error writing fsbn 28344398 of 28344398-28344399 (wd0 bn 46504274; cn 14473 tn 40 sn 5), retrying
wd0: (aborted command)
8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 giving up
dumping to dev 0,1 offset 608565
>How-To-Repeat:
1. insert CardBus tlp to your PC,
2. boot a kernel with DIAGNOSTIC in single user mode,
3. ifconfig tlp0 up
4. suspend the system,
5. resume the system,
6. the system panics.
>Fix:
The card doesn't powered up correctly.
This patch fixes the problem.
Is it correct?
(Adding Cardbus_function_enable() only does not fix the problem.)
Index: if_tlp_cardbus.c
===================================================================
RCS file: /cvsroot/src/sys/dev/cardbus/if_tlp_cardbus.c,v
retrieving revision 1.38
diff -u -p -r1.38 if_tlp_cardbus.c
--- if_tlp_cardbus.c 2002/11/11 12:51:38 1.38
+++ if_tlp_cardbus.c 2003/06/09 14:09:50
@@ -581,8 +581,10 @@ tlp_cardbus_power(sc, why)
if (TULIP_IS_ENABLED(sc) == 0)
panic("tlp_cardbus_power");
#endif
+ Cardbus_function_enable(csc->sc_ct); /* Power on the socket. */
tlp_cardbus_setup(csc);
- }
+ } else
+ Cardbus_function_disable(csc->sc_ct);/* Power off the socket. */
}
void
>Release-Note:
>Audit-Trail:
From: "Charles M. Hannum" <abuse@spamalicious.com>
To: itohy@netbsd.org
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: kern/21838: "panic: cardbus_get_capability" on apm resume when CardBus tlp(4) was running
Date: Thu, 22 Jul 2004 17:25:31 +0000
--Boundary-00=_Li//A4x+srR9GeK
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Can you try this patch instead? I think this needs to be done to all of the
CardBus drivers.
--Boundary-00=_Li//A4x+srR9GeK
Content-Type: text/x-diff;
charset="us-ascii";
name="tlp.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="tlp.diff"
Index: if_tlp_cardbus.c
===================================================================
RCS file: /cvsroot/src/sys/dev/cardbus/if_tlp_cardbus.c,v
retrieving revision 1.42
diff -u -r1.42 if_tlp_cardbus.c
--- if_tlp_cardbus.c 22 Jul 2004 15:50:50 -0000 1.42
+++ if_tlp_cardbus.c 22 Jul 2004 17:24:28 -0000
@@ -575,17 +575,10 @@
{
struct tulip_cardbus_softc *csc = (void *) sc;
- if (why == PWR_RESUME) {
- /*
- * Give the PCI configuration registers a kick
- * in the head.
- */
-#ifdef DIAGNOSTIC
- if (TULIP_IS_ENABLED(sc) == 0)
- panic("tlp_cardbus_power");
-#endif
- tlp_cardbus_setup(csc);
- }
+ if (why == PWR_RESUME || why == PWR_SOFTRESUME)
+ tlp_cardbus_enable(sc);
+ else
+ tlp_cardbus_disable(sc);
}
void
--Boundary-00=_Li//A4x+srR9GeK--
From: "Charles M. Hannum" <abuse@spamalicious.com>
To: itohy@netbsd.org
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: kern/21838: "panic: cardbus_get_capability" on apm resume when CardBus tlp(4) was running
Date: Thu, 22 Jul 2004 17:42:20 +0000
--Boundary-00=_8x//AjOhQhgaDMe
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
On Thursday 22 July 2004 17:25, Charles M. Hannum wrote:
> Can you try this patch instead? I think this needs to be done to all of
> the CardBus drivers.
Sorry, this patch is more appropriate.
--Boundary-00=_8x//AjOhQhgaDMe
Content-Type: text/x-diff;
charset="iso-8859-1";
name="tlp.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="tlp.diff"
Index: if_tlp_cardbus.c
===================================================================
RCS file: /cvsroot/src/sys/dev/cardbus/if_tlp_cardbus.c,v
retrieving revision 1.42
diff -u -r1.42 if_tlp_cardbus.c
--- if_tlp_cardbus.c 22 Jul 2004 15:50:50 -0000 1.42
+++ if_tlp_cardbus.c 22 Jul 2004 17:41:39 -0000
@@ -573,18 +573,14 @@
struct tulip_softc *sc;
int why;
{
- struct tulip_cardbus_softc *csc = (void *) sc;
- if (why == PWR_RESUME) {
- /*
- * Give the PCI configuration registers a kick
- * in the head.
- */
-#ifdef DIAGNOSTIC
- if (TULIP_IS_ENABLED(sc) == 0)
- panic("tlp_cardbus_power");
-#endif
- tlp_cardbus_setup(csc);
+ switch (why) {
+ case PWR_RESUME:
+ tlp_cardbus_enable(sc);
+ break;
+ case PWR_SUSPEND:
+ tlp_cardbus_disable(sc);
+ break;
}
}
--Boundary-00=_8x//AjOhQhgaDMe--
From: itohy@netbsd.org (ITOH Yasufumi)
To: abuse@spamalicious.com
Cc: gnats-bugs@gnats.netbsd.org, itohy@netbsd.org
Subject: Re: kern/21838: "panic: cardbus_get_capability" on apm resume when CardBus tlp(4) was running
Date: Sat, 24 Jul 2004 23:27:48 +0900 (JST)
abuse@spamalicious.com writes:
> On Thursday 22 July 2004 17:25, Charles M. Hannum wrote:
> > Can you try this patch instead? I think this needs to be done to all of
> > the CardBus drivers.
>
> Sorry, this patch is more appropriate.
OK, this patch fixes the problem.
I tried this patch against 2.0G (July 23, 2004) kernel
and I confirmed that
1. kernel panics without this patch, and
2. kernel doesn't panic with this patch.
Thanks,
--
ITOH Yasufumi
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.