From nobody@FreeBSD.org  Thu Oct 20 20:56:44 2005
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 8E92F16A41F
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 20 Oct 2005 20:56:44 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 5CE0543D5A
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 20 Oct 2005 20:56:44 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j9KKuhNO010087
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 20 Oct 2005 20:56:44 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id j9KKuhMd010076;
	Thu, 20 Oct 2005 20:56:43 GMT
	(envelope-from nobody)
Message-Id: <200510202056.j9KKuhMd010076@www.freebsd.org>
Date: Thu, 20 Oct 2005 20:56:43 GMT
From: Paulo Fragoso <paulo@nlink.com.br>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Reboot problem with atheros wireless card (DWL-G520)
X-Send-Pr-Version: www-2.3

>Number:         87758
>Category:       kern
>Synopsis:       [ath] [hang] Reboot problem with atheros wireless card (DWL-G520)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-net
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 20 21:00:34 GMT 2005
>Closed-Date:    Mon Feb 02 23:47:34 UTC 2009
>Last-Modified:  Mon Feb 02 23:47:34 UTC 2009
>Originator:     Paulo Fragoso
>Release:        FreeBSD 6.0-RC1 i386
>Organization:
Nlink ISP
>Environment:
FreeBSD bmarx2-brd.nlink.com.br 6.0-RC1 FreeBSD 6.0-RC1 #0: Tue Oct 18 11:42:09 GMT+3 2005     root@teste.nlink.com.br:/usr/src/sys/i386/compile/KERNEL1  i386
>Description:
When using a wireless client running FreeBSD 6.0-RC1 and wireless card
D-Link DWL-520 with ahteros chipset, this system freezes after reboot
command. Only after turn off by power button we can use again this machine.

This is critical because FreeBSD 6.0 has focus target to wireless devices.

There isn't problem if ath0 interface wasn't configure.
>How-To-Repeat:
Using a wireless card D-Link DWL-520, modify /boot/loader.conf:

wlan_wep_load="YES"
if_ath_load="YES"
ath_hal_load="YES"
ath_rate_load="YES"

and configure ath0 interface to associate with some AP, example
/etc/start_if.ath0:

ifconfig ath0 inet A.B.C.D netmask 255.255.255.192  ssid 'SOMENETWORK' \
wepmode on wepkey 0x2020202020 weptxkey 1 media DS/2Mbps mode 11b

All is working but after run "reboot" command this system freezes after
sync disks and print uptime.

We have tested with 03 different motherboards, one running Celeron and
others AMD processors.

There isn't problem using same hardware and not configure ath0 interface.
This problem appear only after stablish some wireless connection using
ath0 internface
>Fix:
I don't know.
>Release-Note:
>Audit-Trail:

From: Paulo Fragoso <paulo@nlink.com.br>
To: FreeBSD-gnats-submit@FreeBSD.org,  freebsd-bugs@FreeBSD.org
Cc:  
Subject: Re: kern/87758: Reboot problem with atheros wireless card (DWL-G520)
Date: Sat, 08 Jul 2006 10:36:49 -0300

 Hi,
 
 This problem are happening yet using FreeBSD 6.x, but there are some 
 motherboards  working fine like Gigabyte GA-K8NS.
 
 I'm using a perl script to workaround this problem on all motherboards:
 
 =================================================================
 #!/usr/bin/perl -T
 
 $ENV{'PATH'} = '/bin:/sbin:/usr/bin:/usr/sbin';
 delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
 
 $debug = 0;
 $wlans="ath";
 
 $cmd = "/sbin/ifconfig -l";
 print "DEBUG: Executa: $cmd\n" if $debug;
 $nics = qx( $cmd );
 
 @tipos = split( /\s+/, $wlans );
 @nic = split( /\s+/, $nics );
 
 $k = 0;
 for( $i = 0 ; $i <= $#tipos ; $i++ ){
   $tmp = $tipos[ $i ];
   print "DEBUG: Veifica o tipo: $tmp\n" if $debug;
   for( $j = 0 ; $j <= $#nic ; $j++ ){
     if( $nic[ $j ] =~ /$tmp/ ){
       print "DEBUG: Encontrou: $nic[ $j ]\n" if $debug;
       if( $nic[ $j ] =~ /^(\w+)$/ ){
         $interface[ $k++ ] = $1;
       }
     }
   }
 }
 
 for( $k = 0 ; $k <= $#interface ; $k++ ){
   $cmd = "/sbin/ifconfig $interface[ $k ] down";
   print "DEBUG: $cmd\n" if $debug;
   qx( $cmd );
 }
 
 print "DEBUG: Reiniciando...\n" if $debug;
 qx( reboot );
 =================================================================
 
 All cards listed in $wlans have yours state changed to down before 
 reboot, now we can reboot all servers with atheros card.
 
 Paulo.
 
 FreeBSD-gnats-submit@FreeBSD.org escreveu, Em 20/10/2005 18:00:
 > Thank you very much for your problem report.
 > It has the internal identification `kern/87758'.
 > The individual assigned to look at your
 > report is: freebsd-bugs. 
 >
 > You can access the state of your problem report at any time
 > via this link:
 >
 > http://www.freebsd.org/cgi/query-pr.cgi?pr=87758
 >
 >   
 >> Category:       kern
 >> Responsible:    freebsd-bugs
 >> Synopsis:       Reboot problem with atheros wireless card (DWL-G520)
 >> Arrival-Date:   Thu Oct 20 21:00:34 GMT 2005
 >>     
State-Changed-From-To: open->feedback 
State-Changed-By: vwe 
State-Changed-When: Fri Jan 30 20:56:25 UTC 2009 
State-Changed-Why:  
Paulo, 
is your PR still valid? If you, can you please check if it's not an ACPI 
issue by using `sysctl hw.acpi.handle_reboot`? 
Personally I've used several ath cards on several mainboards and have 
never seen your problem. Can you please check that issue with a recent 
release of freebsd? 6.0 has been EOL'd some time ago. 


Responsible-Changed-From-To: freebsd-bugs->freebsd-net 
Responsible-Changed-By: vwe 
Responsible-Changed-When: Fri Jan 30 20:56:25 UTC 2009 
Responsible-Changed-Why:  
-> net@ 

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

From: linimon@lonesome.com (Mark Linimon)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/87758: [ath] [hang] Reboot problem with atheros wireless card (DWL-G520)
Date: Mon, 2 Feb 2009 17:08:29 -0600

 ----- Forwarded message from Paulo Fragoso <paulo@nlink.com.br> -----
 
 From: Paulo Fragoso <paulo@nlink.com.br>
 To: vwe@FreeBSD.org
 Cc: freebsd-net@FreeBSD.org, freebsd-bugs@FreeBSD.org
 Subject: Re: kern/87758: [ath] [hang] Reboot problem with atheros wireless
  card (DWL-G520)
 
 We didn't find this problem since 6.2-RELEASE.
 
 Paulo.
 
 ----- End forwarded message -----
State-Changed-From-To: feedback->closed 
State-Changed-By: linimon 
State-Changed-When: Mon Feb 2 23:47:19 UTC 2009 
State-Changed-Why:  
Submitter notes this problem is resolved. 

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