From nobody@FreeBSD.org  Thu Feb  7 23:46:21 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BBC3216A41A
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  7 Feb 2008 23:46:21 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id AE2CA13C45D
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  7 Feb 2008 23:46:21 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m17NiFpN036736
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 7 Feb 2008 23:44:15 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m17NiFFl036725;
	Thu, 7 Feb 2008 23:44:15 GMT
	(envelope-from nobody)
Message-Id: <200802072344.m17NiFFl036725@www.freebsd.org>
Date: Thu, 7 Feb 2008 23:44:15 GMT
From: Martin Sugioarto <nakal@web.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: High interrupt load when booting with ath (PCMCIA) already inserted, also panic
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         120376
>Category:       kern
>Synopsis:       [ath] High interrupt load when booting with ath (PCMCIA) already inserted, also panic
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    imp
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 07 23:50:00 UTC 2008
>Closed-Date:    Fri May 13 14:13:52 MDT 2011
>Last-Modified:  Fri May 13 14:13:52 MDT 2011
>Originator:     Martin Sugioarto
>Release:        FreeBSD7.0 PRERELEASE
>Organization:
>Environment:
FreeBSD link.local 7.0-PRERELEASE FreeBSD 7.0-PRERELEASE #1: Wed Feb  6 15:31:41 CET 2008     root@link.local:/usr/obj/usr/src/sys/LINK  i386
>Description:
My ath(4) card (Netgear WG511T PCMCIA) is not working at all when I insert
it before switching my laptop on. Instead systat/top show high load with
interrupts. I also attached kernel messages appearing (see part of dmesg
output). In this state you can also cause a panic when you eject the card.

I can use my wireless LAN with ath(4) perfectly (perhaps associating a bit
slow, but at least it works) when inserting it after login appears.

Here some additional info (while the card is not working). In case you
need more contact me.


dmesg (small part):
ath0: device timeout
ath0: ath_reset: unable to reset hardware; hal status 3231587658
ath0: ath_chan_set: unable to reset channel 6 (2437 Mhz, flags 0x480 hal flags 0xc0)
ath0: ath_chan_set: unable to reset channel 11 (2462 Mhz, flags 0x480 hal flags 0xc0)


from systat:

                    /0   /1   /2   /3   /4   /5   /6   /7   /8   /9   /10
     Load Average   >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

                    /0%  /10  /20  /30  /40  /50  /60  /70  /80  /90  /100
root     irq16: cbb XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
root     swi4: cloc XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
root     idle: cpu1 XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
root     idle: cpu0 XXXXXXXXX


# sysctl hw.ath
hw.ath.hal.swba_backoff: 0
hw.ath.hal.sw_brt: 10
hw.ath.hal.dma_brt: 2
hw.ath.hal.version: 0.9.20.3
hw.ath.txbuf: 200
hw.ath.rxbuf: 40
hw.ath.regdomain: 0
hw.ath.countrycode: 0
hw.ath.xchanmode: 1
hw.ath.outdoor: 1
hw.ath.calibrate: 30

# sysctl dev.ath
dev.ath.0.%desc: Atheros 5212
dev.ath.0.%driver: ath
dev.ath.0.%location: slot=0 function=0
dev.ath.0.%pnpinfo: vendor=0x168c device=0x0013 subvendor=0x1385 subdevice=0x4b00 class=0x020000
dev.ath.0.%parent: cardbus0
dev.ath.0.smoothing_rate: 95
dev.ath.0.sample_rate: 10
dev.ath.0.countrycode: 0
dev.ath.0.regdomain: 0
dev.ath.0.slottime: 1489
dev.ath.0.acktimeout: 372
dev.ath.0.ctstimeout: 372
dev.ath.0.softled: 0
dev.ath.0.ledpin: 0
dev.ath.0.ledon: 0
dev.ath.0.ledidle: 2700
dev.ath.0.txantenna: 0
dev.ath.0.rxantenna: 7
dev.ath.0.diversity: 1
dev.ath.0.txintrperiod: 5
dev.ath.0.diag: 0
dev.ath.0.tpscale: 0
dev.ath.0.tpc: 0
dev.ath.0.tpack: 63
dev.ath.0.tpcts: 63
dev.ath.0.fftxqmin: 2
dev.ath.0.fftxqmax: 50
dev.ath.0.monpass: 24

>How-To-Repeat:
Insert ath(4)-card, switch laptop on and boot FreeBSD.
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->imp 
Responsible-Changed-By: remko 
Responsible-Changed-When: Sat Feb 9 11:39:05 UTC 2008 
Responsible-Changed-Why:  
Hi Warner, this might be cardbus related, can you have a look? (we still 
need a kernel dump etc I think I wil request that in a sec) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=120376 
State-Changed-From-To: open->feedback 
State-Changed-By: remko 
State-Changed-When: Sat Feb 9 11:39:31 UTC 2008 
State-Changed-Why:  
Hell, can you provide us with a kernel traceback of the panic as 
documented on 
http://www.freebsd.org/doc/en/books/developers-handbook/kerneldebug.html 
? thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=120376 
State-Changed-From-To: feedback->open 
State-Changed-By: linimon 
State-Changed-When: Sun Feb 10 09:01:01 UTC 2008 
State-Changed-Why:  
Adding to audit trail from misfiled PR kern/120486: 

Date: Sun, 10 Feb 2008 01:04:51 +0100 
From: Martin Sugioarto <nakal@web.de> 

Here the backtrace: 

#0  doadump () at pcpu.h:195 
#1  0xc06ca481 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:409 
#2  0xc06ca786 in panic (fmt=Variable "fmt" is not available. 
) at /usr/src/sys/kern/kern_shutdown.c:563 
#3  0xc06ed0e8 in resource_list_release (rl=0xc4129e04, bus=0xc40dd780, 
child=0xc4287d80, type=3, rid=16, res=0xc42d77c0) 
at /usr/src/sys/kern/subr_bus.c:2777 
#4  0xc06ed259 in bus_generic_rl_release_resource (dev=0xc40dd780, 
child=0xc4287d80, type=3, rid=16, r=0xc42d77c0) 
at /usr/src/sys/kern/subr_bus.c:3328 
#5  0xc06ecdbd in bus_release_resource (dev=0xc4287d80, type=3, rid=16, 
r=0xc42d77c0) at bus_if.h:347 
#6  0xc04f4b31 in ath_pci_detach (dev=0xc4287d80) 
at /usr/src/sys/dev/ath/if_ath_pci.c:223 
#7  0xc06eb13c in device_detach (dev=0xc4287d80) at device_if.h:212 
#8  0xc050d82b in cardbus_detach_card (cbdev=0xc40dd780) 
at /usr/src/sys/dev/cardbus/cardbus.c:236 
#9  0xc059ffaf in cbb_event_thread (arg=0xc400f000) at card_if.h:95 
#10 0xc06a9b61 in fork_exit (callout=0xc059fe0a <cbb_event_thread>, 
arg=0xc400f000, frame=0xe46fbd38) at /usr/src/sys/kern/kern_fork.c:781 
#11 0xc0976470 in fork_trampoline () at /usr/src/sys/i386/i386/exception.s:205 

_______________________________________________________________________ 
Jetzt neu! Sch=FCtzen Sie Ihren PC mit McAfee und WEB.DE. 30 Tage 
kostenlos testen. http://www.pc-sicherheit.web.de/startseite/=3Fmc=022220 


http://www.freebsd.org/cgi/query-pr.cgi?pr=120376 

From: Martin <nakal@web.de>
To: bug-followup@FreeBSD.org
Cc: imp@FreeBSD.org
Subject: Re: kern/120376: [ath] High interrupt load when booting with ath
 (PCMCIA) already inserted, also panic
Date: Tue, 18 Nov 2008 16:04:28 +0100

 Hi,
 
 I've further worked on this problem and noticed that something is not
 right with my hardware. One of both is broken, it may be the PCMCIA bus
 or it may be the card itself. I suppose it is the latter one, because
 I've seen on of my notebooks crashing MS-Windows just by inserting the
 card. My notebook on which I tested the card gives me beep sounds during
 usage of the card now. These are NMI notifications and indicate a
 hardware failure.
 
 Of course, the results and the logs are unusable in this case.
 
 I want to keep my PRs tidy. So I would like you to close this bug
 report for me.
 
 --
 Thank you,
 Martin

From: "M. Warner Losh" <imp@bsdimp.com>
To: nakal@web.de
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/120376: [ath] High interrupt load when booting with ath
 (PCMCIA) already inserted, also panic
Date: Tue, 18 Nov 2008 15:00:37 -0700 (MST)

 In message: <20081118160428.2461bd18@zelda.local>
             Martin <nakal@web.de> writes:
 : 
 : 
 : Hi,
 : 
 : I've further worked on this problem and noticed that something is not
 : right with my hardware. One of both is broken, it may be the PCMCIA bus
 : or it may be the card itself. I suppose it is the latter one, because
 : I've seen on of my notebooks crashing MS-Windows just by inserting the
 : card. My notebook on which I tested the card gives me beep sounds during
 : usage of the card now. These are NMI notifications and indicate a
 : hardware failure.
 : 
 : Of course, the results and the logs are unusable in this case.
 : 
 : I want to keep my PRs tidy. So I would like you to close this bug
 : report for me.
 
 I've noticed that doing a dumpcis while ath0 is running causes a high
 load.  I've fixed that.  Maybe this is your problem?
 
 Warner

From: Martin <nakal@web.de>
To: "M. Warner Losh" <imp@bsdimp.com>
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/120376: [ath] High interrupt load when booting with ath
 (PCMCIA) already inserted, also panic
Date: Wed, 19 Nov 2008 00:01:43 +0100

 Am Tue, 18 Nov 2008 15:00:37 -0700 (MST)
 schrieb "M. Warner Losh" <imp@bsdimp.com>:
 
 > I've noticed that doing a dumpcis while ath0 is running causes a high
 > load.  I've fixed that.  Maybe this is your problem?
 > 
 > Warner
 
 Hi,
 
 this was a very complex behaviour. When I tried to boot the notebook
 with the card inserted, nothing worked. I had only high load and the
 deviced showed me ath_hal errors.
 
 I could use it very long time when I inserted the card after the
 notebook was already up (after wpa_supplicant phase already passed).
 After some time I had NMI beeps and then the card failed totally and
 did not power up anymore (all leds off).
 
 I have the card here, but I cannot verify what you suggest, because it
 does not work anymore. I've installed FreeBSD on some other notebook
 recently, but I will see this notebook in a month or so. I will check
 then, if the card is really broken or just the bus on the notebook I
 use regularly.
 
 Something is definitely broken here and you cannot predict the
 behaviour properly, when the card does not function correctly. I will
 give you feedback as soon I get hands on my other notebook and tell the
 rest of the story.
 
 --
 Thanks,
 Martin
State-Changed-From-To: open->closed 
State-Changed-By: imp 
State-Changed-When: Fri May 13 14:12:46 MDT 2011 
State-Changed-Why:  
This bug has been fixed.  It was caused by HAL using dumpcis to get 
the CIS of the card.  We used to read this while the card was 
operating, which put it into cloud-kookoo land.  Now, we cache the CIS 
at probe time so this problem no longer happens. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=120376 
>Unformatted:
