From nobody@FreeBSD.org  Fri Jan 30 14:49:33 2009
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 38963106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 30 Jan 2009 14:49:33 +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 25A8B8FC13
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 30 Jan 2009 14:49:33 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n0UEnW8E006369
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 30 Jan 2009 14:49:32 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n0UEnWT0006368;
	Fri, 30 Jan 2009 14:49:32 GMT
	(envelope-from nobody)
Message-Id: <200901301449.n0UEnWT0006368@www.freebsd.org>
Date: Fri, 30 Jan 2009 14:49:32 GMT
From: Adam Kirchhoff <adamk@voicenet.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Atheros driver bugginess and kernel crashes
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         131162
>Category:       kern
>Synopsis:       [ath] Atheros driver bugginess and kernel crashes
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-net
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 30 14:50:02 UTC 2009
>Closed-Date:    Tue Mar 30 15:21:18 UTC 2010
>Last-Modified:  Tue Mar 30 15:21:18 UTC 2010
>Originator:     Adam Kirchhoff
>Release:        7.1-STABLE from January 15th
>Organization:
>Environment:
FreeBSD scroll 7.1-STABLE FreeBSD 7.1-STABLE #2: Fri Jan 30 07:48:57 EST 2009     root@scroll:/usr/obj/usr/src/sys/GENERIC  i386

>Description:

Upon booting up, with 'ifconfig_ath0="WPA DHCP"' in /etc/rc.conf, I start getting these errors from the kernel:

ath0: ath_chan_set: unable to reset channel 7 (2442 Mhz, flags 0x480 hal flags 0xc0), hal status 3302560252
ath0: ath_chan_set: unable to reset channel 52 (5260 Mhz, flags 0x140 hal flags 0x140), hal status 3296823488
ath0: ath_chan_set: unable to reset channel 56 (5280 Mhz, flags 0x140 hal flags 0x140), hal status 0
ath0: ath_chan_set: unable to reset channel 60 (5300 Mhz, flags 0x140 hal flags 0x140), hal status 3304978572

It cycles through various channels till:

ath0: device timeout
ath0: ath_reset: unable to reset hardware; hal status 3232887468

And then it starts with the "unable to reset channel" errors again.  This continues till I run '/etc/rc.d/netif stop ath0'

When I go to remove the card, the kernel panics:

panic: resource_list_release: resource entry is not busy
cpuid = 0
KDB: enter: panic
[thread pid 34 tid 100033 ]
Stopped at      kdb_enter_why+0x3a:     movl    $0,kdb_why
db> bt
Tracing pid 34 tid 100033 td 0xc4988690
kdb_enter_why(c0b5759f,c0b5759f,c0b591cd,e5070bc4,0,...) at kdb_enter_why+0x3a
panic(c0b591cd,3,10,0,c49f91c0,...) at panic+0x136
resource_list_release(c4b6bc04,c494ab80,c49f8900,3,10,...) at resource_list_release+0xc2
bus_generic_rl_release_resource(c494ab80,c49f8900,3,10,c49f9480) at bus_generic_rl_release_resource+0x77
bus_release_resource(c49f8900,3,10,c49f9480,c49f8900,...) at bus_release_resource+0x67
ath_pci_detach(c49f8900,c48a1858,c0c15b60,c07c8125,4,...) at ath_pci_detach+0xb2
device_detach(c49f8900,e5070cac,e5070cb0,c4988690,e5070cc0,...) at device_detach+0x68
cardbus_detach_card(c494ab80,c48b08e0,c0bd2bfc,0,0,...) at cardbus_detach_card+0xcd
cbb_event_thread(c4913800,e5070d38,0,0,0,...) at cbb_event_thread+0x1ac
fork_exit(c0661a50,c4913800,e5070d38) at fork_exit+0x99
fork_trampoline() at fork_trampoline+0x8
--- trap 0, eip = 0, esp = 0xe5070d70, ebp = 0 ---

In kgdb, this is the backtrace:

#0  doadump () at pcpu.h:196
196     pcpu.h: No such file or directory.
        in pcpu.h
(kgdb) bt
#0  doadump () at pcpu.h:196
#1  0xc07a4ef7 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:418
#2  0xc07a5202 in panic (fmt=Variable "fmt" is not available.
) at /usr/src/sys/kern/kern_shutdown.c:574
#3  0xc07cc232 in resource_list_release (rl=0xc4b6ec04, bus=0xc49a8500, child=0xc49fa480, type=3, rid=16, res=0xc49e0a80)
    at /usr/src/sys/kern/subr_bus.c:2777
#4  0xc07cc3c7 in bus_generic_rl_release_resource (dev=0xc49a8500, child=0xc49fa480, type=3, rid=16, r=0xc49e0a80)
    at /usr/src/sys/kern/subr_bus.c:3345
#5  0xc07cbed7 in bus_release_resource (dev=0xc49fa480, type=3, rid=16, r=0xc49e0a80) at bus_if.h:347
#6  0xc053c252 in ath_pci_detach (dev=0xc49fa480) at /usr/src/sys/dev/ath/if_ath_pci.c:223
#7  0xc07ca148 in device_detach (dev=0xc49fa480) at device_if.h:212
#8  0xc055c86d in cardbus_detach_card (cbdev=0xc49a8500) at /usr/src/sys/dev/cardbus/cardbus.c:236
#9  0xc0661bfc in cbb_event_thread (arg=0xc4913800) at card_if.h:95
#10 0xc077fc49 in fork_exit (callout=0xc0661a50 <cbb_event_thread>, arg=0xc4913800, frame=0xe5070d38)
    at /usr/src/sys/kern/kern_fork.c:804
#11 0xc0aa4630 in fork_trampoline () at /usr/src/sys/i386/i386/exception.s:264

	
>How-To-Repeat:

Install 7.1-STABLE, boot with atheros 5212 inserted.  Run wpa_supplicant, get timeout/reset errors, remove card, and watch the kernel panic.

>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-net 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Fri Jan 30 17:51:54 UTC 2009 
Responsible-Changed-Why:  
Over to maintainer(s). 

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

From: Adam K Kirchhoff <adamk@voicenet.com>
To: bug-followup@freebsd.org,
 adamk@voicenet.com
Cc:  
Subject: Re: kern/131162: [ath] Atheros driver bugginess and kernel crashes
Date: Fri, 30 Jan 2009 15:28:06 -0500

 --Boundary-00=_WL2gJ+Gh8LSctaB
 Content-Type: text/plain;
   charset="us-ascii"
 Content-Transfer-Encoding: 7bit
 
 
 The exact same system (card + laptop) works just fine on my 802.11g network at home.  This bug, combined with 
 http://www.freebsd.org/cgi/query-pr.cgi?pr=131153 makes me think that there is some problem with FreeBSD wireless stack when it comes to the 
 Linksys WAP4400N Business Edition.
 
 Adam
 
 
 -- 
 This message has been scanned for viruses and
 dangerous content by MailScanner, and is
 believed to be clean.
 
 
 --Boundary-00=_WL2gJ+Gh8LSctaB
 Content-Type: text/html;
   charset="us-ascii"
 Content-Transfer-Encoding: 7bit
 
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
 <html><head><meta name="qrichtext" content="1" /><style type="text/css">
 p, li { white-space: pre-wrap; }
 </style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;">
 <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"></p>
 <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">The exact same system (card + laptop) works just fine on my 802.11g network at home.  This bug, combined with http://www.freebsd.org/cgi/query-pr.cgi?pr=131153 makes me think that there is some problem with FreeBSD wireless stack when it comes to the Linksys WAP4400N Business Edition.</p>
 <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"></p>
 <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Adam</p>
 <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"></p></body><br />-- 
 <br />This message has been scanned for viruses and
 <br />dangerous content by
 <a href="http://www.mailscanner.info/"><b>MailScanner</b></a>, and is
 <br />believed to be clean.
 </html>
 
 --Boundary-00=_WL2gJ+Gh8LSctaB--

From: Adam K Kirchhoff <adamk@voicenet.com>
To: bug-followup@FreeBSD.org, adamk@voicenet.com
Cc:  
Subject: Re: kern/131162: [ath] Atheros driver bugginess and kernel crashes
Date: Tue, 10 Feb 2009 12:08:39 -0500

 Is there *anything* else I can do to track down this problem?  
 
 Adam
 
 -- 
 This message has been scanned for viruses and
 dangerous content by MailScanner, and is
 believed to be clean.
 

From: Adam K Kirchhoff <adamk@mckella280.com>
To: bug-followup@FreeBSD.org, adamk@voicenet.com
Cc:  
Subject: Re: kern/131162: [ath] Atheros driver bugginess and kernel crashes
Date: Tue, 30 Mar 2010 09:27:56 -0400

 This can be closed.  ath is working with these APs now.
 
 Adam
State-Changed-From-To: open->closed 
State-Changed-By: rpaulo 
State-Changed-When: Tue Mar 30 15:20:56 UTC 2010 
State-Changed-Why:  
Submitter agrees to close PR. 

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