From owner-freebsd-current@FreeBSD.ORG Sat Sep 29 03:25:28 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 72D4416A417 for ; Sat, 29 Sep 2007 03:25:28 +0000 (UTC) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id 2993913C459 for ; Sat, 29 Sep 2007 03:25:27 +0000 (UTC) (envelope-from sam@errno.com) Received: from sam-lefflers-powerbook-g4-15.local ([10.0.0.178]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id l8T3PRv5017675 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 28 Sep 2007 20:25:27 -0700 (PDT) (envelope-from sam@errno.com) Message-ID: <46FDC5A4.5060403@errno.com> Date: Fri, 28 Sep 2007 20:25:24 -0700 From: Sam Leffler Organization: Errno Consulting User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Weongyo Jeong References: <20070929025030.GA66680@freebsd.weongyo.org> In-Reply-To: <20070929025030.GA66680@freebsd.weongyo.org> X-Enigmail-Version: 0.95.3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-DCC-Rhyolite-Metrics: o.com; whitelist Cc: freebsd-current@freebsd.org Subject: Re: atheros panic (D-Link DWL-G520) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Sep 2007 03:25:28 -0000 Weongyo Jeong wrote: > My device is D-Link DWL-G520 and the device encountered a panic when I > did `ifconfig ath0 up'. The kernel was cvs-uped yesterday. The following > are the panic message: > > hostap# ifconfig ath0 up > ath0: ath_chan_set: unable to reset channel 1 (2412 Mhz, flags 0x480 hal > flags 0xc0) > hostap# ath0: ath_chan_set: unable to reset channel 11 (2462 Mhz, flags > 0x480 hal flags 0xc0) > ath0: ath_chan_set: unable to reset channel 13 (2472 Mhz, flags 0x480 > hal flags 0xc0) > ath0: ath_chan_set: unable to reset channel 3 (2422 Mhz, flags 0x480 hal > flags 0xc0) > ath0: ath_chan_set: unable to reset channel 8 (2447 Mhz, flags 0x480 hal > flags 0xc0) > ath0: hardware error; resetting > ath0: 0x00080000 0x00000000 0x00000000, 0x00010000 0x00000000 0x00000000 > > > Fatal trap 18: integer divide fault while in kernel mode > cpuid = 0; apic id = 00 > instruction pointer = 0x20:0xc09f0d25 > stack pointer = 0x28:0xcbd3acd8 > frame pointer = 0x28:0xcbd3acd8 > code segment = base 0x0, limit 0xfffff, type 0x1b > = DPL 0, pres 1, def32 1, gran 1 > processor eflags = interrupt enabled, IOPL = 0 > current process = 11 (idle: cpu0) > [thread pid 11 tid 100004 ] > Stopped at cpu_idle_default+0x5: popl %ebp > db> bt > Tracing pid 11 tid 100004 td 0xc20f7630 > cpu_idle_default(cbd3acf8,c0769e17,c0bad610,2,c0a9a19d,...) at > cpu_idle_default+0x5 > cpu_idle(c0bad610,2,c0a9a19d,562,cbd3ad24,...) at cpu_idle+0x28 > sched_idletd(0,cbd3ad38,c0a9515d,314,c20f6aa0,...) at sched_idletd+0x37 > fork_exit(c0769de0,0,cbd3ad38) at fork_exit+0xb8 > fork_trampoline() at fork_trampoline+0x8 > --- trap 0, eip = 0, esp = 0xcbd3ad70, ebp = 0 --- > db> > > > And the below informations are device informations: > > hostap# uname -a > FreeBSD hostap 7.0-CURRENT FreeBSD 7.0-CURRENT #1: Thu Sep 27 02:43:04 > KST 2007 root@rumhostap:/usr/obj/usr/src/sys/GENERIC i386 > > hostap# pciconf -lcv > ath0@pci2:2:0: class=0x020000 card=0x3a131186 chip=0x0013168c rev=0x01 > hdr=0x00 > vendor = 'Atheros Communications Inc.' > device = 'AR5212, AR5213 802.11a/b/g Wireless Adapter' > class = network > subclass = ethernet > cap 01[44] = powerspec 2 supports D0 D3 current D0 > > hostap# sysctl -a | grep dev.ath.0 > dev.ath.0.%desc: Atheros 5212 > dev.ath.0.%driver: ath > dev.ath.0.%location: slot=2 function=0 > dev.ath.0.%pnpinfo: vendor=0x168c device=0x0013 subvendor=0x1186 > subdevice=0x3a13 class=0x020000 > dev.ath.0.%parent: pci2 > dev.ath.0.smoothing_rate: 95 > dev.ath.0.sample_rate: 10 > dev.ath.0.countrycode: 0 > dev.ath.0.regdomain: 48 > dev.ath.0.slottime: 9 > dev.ath.0.acktimeout: 96 > dev.ath.0.ctstimeout: 96 > 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: 0 > dev.ath.0.diversity: 0 > 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 > > hostap# ifconfig ath0 list channel > Channel 1 : 2412 Mhz 11g Channel 8 : 2447 Mhz 11g > Channel 2 : 2417 Mhz 11g Channel 9 : 2452 Mhz 11g > Channel 3 : 2422 Mhz 11g Channel 10 : 2457 Mhz 11g > Channel 4 : 2427 Mhz 11g Channel 11 : 2462 Mhz 11g > Channel 5 : 2432 Mhz 11g Channel 12 : 2467 Mhz 11g > Channel 6 : 2437 Mhz 11g Turbo Channel 13 : 2472 Mhz 11g > Channel 7 : 2442 Mhz 11g > > stap# /sbin/ifconfig > ath0: flags=8802 metric 0 mtu 1500 > ether 00:1b:11:1a:ee:32 > media: IEEE 802.11 Wireless Ethernet autoselect (autoselect) > status: no carrier > ssid "" channel 1 (2412 Mhz 11b) > authmode OPEN privacy OFF txpowmax 100 bmiss 7 scanvalid 60 bgscan > bgscanintvl 300 bgscanidle 250 roam:rssi11b 14 roam:rate11b 1 burst > > hostap# dmesg | grep -i ath > ath_hal: 0.9.20.3 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413) > ath0: mem 0xe7000000-0xe700ffff irq 11 at device 2.0 on pci2 > ath0: [ITHREAD] > ath0: using obsoleted if_watchdog interface > ath0: Ethernet address: 00:1b:11:1a:ee:32 > ath0: mac 7.9 phy 4.5 radio 5.6 Unfortunately the value of status isn't printed when the ath_hal_reset calls fail. Please add that to the printf in ath_chan_set. Not sure where the divide fault comes from; the stack trace doesn't provide much help. If you don't have INVARIANTS enabled you should do that in case it catches what's going on before the panic happens. Sam