From owner-freebsd-bugs@FreeBSD.ORG Wed Aug 7 02:50:00 2013 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C9020D7C for ; Wed, 7 Aug 2013 02:50:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A30DD207B for ; Wed, 7 Aug 2013 02:50:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r772o0mY038548 for ; Wed, 7 Aug 2013 02:50:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r772o016038547; Wed, 7 Aug 2013 02:50:00 GMT (envelope-from gnats) Resent-Date: Wed, 7 Aug 2013 02:50:00 GMT Resent-Message-Id: <201308070250.r772o016038547@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Julio Merino Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5B1D4C76 for ; Wed, 7 Aug 2013 02:45:30 +0000 (UTC) (envelope-from julio+host-mastodon-jmmv@meroh.net) Received: from hrndva-omtalb.mail.rr.com (hrndva-omtalb.mail.rr.com [71.74.56.122]) by mx1.freebsd.org (Postfix) with ESMTP id 1B3EE204F for ; Wed, 7 Aug 2013 02:45:29 +0000 (UTC) Received: from [108.176.158.82] ([108.176.158.82:65531] helo=portal.meroh.net) by hrndva-oedge02.mail.rr.com (envelope-from ) (ecelerity 2.2.3.46 r()) with ESMTP id 2C/93-18468-8C4B1025; Wed, 07 Aug 2013 02:45:28 +0000 Received: from mastodon.meroh.net (lime-wifi.meroh.net [192.168.1.27]) by portal.meroh.net (Postfix) with ESMTP id DBFE7EFE67 for ; Tue, 6 Aug 2013 22:45:19 -0400 (EDT) Received: from mastodon.meroh.net (localhost [127.0.0.1]) by mastodon.meroh.net (8.14.7/8.14.7) with ESMTP id r772jPNo001342 for ; Tue, 6 Aug 2013 22:45:25 -0400 (EDT) (envelope-from jmmv@mastodon.meroh.net) Received: (from jmmv@localhost) by mastodon.meroh.net (8.14.7/8.14.7/Submit) id r772jPNv001341; Tue, 6 Aug 2013 22:45:25 -0400 (EDT) (envelope-from jmmv) Message-Id: <201308070245.r772jPNv001341@mastodon.meroh.net> Date: Tue, 6 Aug 2013 22:45:25 -0400 (EDT) From: Julio Merino To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.114 Subject: kern/181100: Turning up bwi0 crashes / deadlocks the kernel X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Julio Merino List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Aug 2013 02:50:00 -0000 >Number: 181100 >Category: kern >Synopsis: Turning up bwi0 crashes / deadlocks the kernel >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Aug 07 02:50:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Julio Merino >Release: FreeBSD 10.0-CURRENT powerpc >Organization: >Environment: System: FreeBSD mastodon.meroh.net 10.0-CURRENT FreeBSD 10.0-CURRENT #0 r253975M: Mon Aug 5 20:31:12 EDT 2013 jmmv@mastodon.meroh.net:/usr/obj/usr/src/sys/GENERIC64 powerpc Kernel does NOT have WITNESS enabled. >Description: I don't know if this is a powerpc-related issue or if it is a generic issue with (possibly) interrupt handling. I'm filing the report in the kern component for triage. I have a PowerMac G5 in which I'm trying to set up a wireless connection. I have installed the bwi-firmware-kmod-3.130.20 package and attempted the following commands: # kldload if_bwi # ifconfig wlan0 create wlandev bwi0 # ifconfig bwi0 up scan as described in the handbook. However, after the third command, the kernel crashes or sometimes apparently deadlocks. The last time this happened resulted in the following messages spewed to the console (manually transcribed): ----- bwi0: mem 0x80104000-0x80105fff irq 185 at device 1.0 on pci5 bwi0: BBP: id 0x4306, rev 0x2, pkg 0 bwi0: MA bwi0: PHY: type 2, rev 1, ver 1 bwi0: RF: manu 0x17f, type 0x2050, rev 2 bwi0: invalid antenna gain in sprom atapci1 at device 12.1 on pci8 pcib1: failed to reserve resource for pcib8 atapci1: 0x10 bytes of rid 0x20 res 4 failed (0, 0xffffffffffffffff). atapci1: unable to map interrupt device_attach: atapci1 attach returned 6 wlan0: Ethernet address: xx:xx:xx:xx:xx:xx bwi0: firmware rev 0x0127, patch level 0x000e fatal kernel trap: exception = 0x300 (data storage interrupt) virtual address = 0x6275735f676574 dsisr = 0x46000000 srr0 = 0x7c4ed8 srr1 = 0x9000000000009032 lr = 0xc00000000b554590 curthread = 0x25b2b490 pid = 12, comm = irq185: bwi0 [ thread pid 12 tid 100102 ] Stopped at 0x7c4ed8: ld r30, r27, 0x0, ----- To me, this looks like an interrupt routing problem or some other kind of device conflict. Note that the error messages seem to indicate that. Also, I have no idea why atapci1 appears after bwi0 given that I did not perform any other activities in between the commands mentioned above that could cause a storage device from being attached. This is the output of atapci-related entries in sysctl, which shows nothing about atapci1: ----- $ sysctl -a | grep atapci mastodon:~> sysctl -a | grep atapci dev.ata.2.%parent: atapci0 dev.ata.3.%parent: atapci0 dev.ata.4.%parent: atapci0 dev.ata.5.%parent: atapci0 dev.atapci.0.%desc: ServerWorks K2 SATA150 controller dev.atapci.0.%driver: atapci dev.atapci.0.%location: slot=12 function=0 dev.atapci.0.%pnpinfo: vendor=0x1166 device=0x0240 subvendor=0x1166 subdevice=0x0240 class=0x01018f name=k2-sata-root compat=k2-s-ata dev.atapci.0.%parent: pci8 ----- And, finally, atapci messages from dmesg after a reboot, without having loaded bwi0 at all: ----- mastodon:~> dmesg | grep atapci atapci0: mem 0x80600000-0x80601fff irq 128 at device 12.0 on pci8 atapci0: 0x10 bytes of rid 0x20 res 4 failed (0, 0xffffffffffffffff). ata2: at channel 0 on atapci0 ata3: at channel 1 on atapci0 ata4: at channel 2 on atapci0 ata5: at channel 3 on atapci0 atapci1: at device 12.1 on pci8 atapci1: 0x10 bytes of rid 0x20 res 4 failed (0, 0xffffffffffffffff). atapci1: unable to map interrupt device_attach: atapci1 attach returned 6 ------ I can provide more information if necessary. >How-To-Repeat: On a PowerMac G5 (and possibly other machines): # kldload if_bwi # ifconfig wlan0 create wlandev bwi0 # ifconfig bwi0 up scan >Fix: >Release-Note: >Audit-Trail: >Unformatted: