From owner-freebsd-current@FreeBSD.ORG Fri Jan 1 23:11:25 2010 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3667F106566B; Fri, 1 Jan 2010 23:11:25 +0000 (UTC) (envelope-from weongyo.jeong@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.26]) by mx1.freebsd.org (Postfix) with ESMTP id B9BBD8FC15; Fri, 1 Jan 2010 23:11:24 +0000 (UTC) Received: by qw-out-2122.google.com with SMTP id 9so3030056qwb.7 for ; Fri, 01 Jan 2010 15:11:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:mail-followup-to:references :mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to:user-agent:organization :x-operation-sytem; bh=Xr76SatStJvkrpuiZeDzJfyIMPB1OSJNsmqQ1Zyw8hU=; b=mqzEAWwDadXUfjp+De6iqP6JYNU7aRpIT/cVJNfAtBAGAk5KmUjQNXYkenPSxQuDND NjpDT9s+ArW9bN1qxOvCUzBxuQvoAqB20PLyf1PVv2Ggk5QQj3m9sz3DbhzEZkK8HMye Nwx+lk7HT0qHqMIU2BHl2pIj7RR9wXnBicRws= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:mail-followup-to :references:mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to:user-agent:organization :x-operation-sytem; b=LDV/Ff0CiT3evBu55i+HXlGKBgMwfPVworGnL62KEJVqYrRODO/K9WAbi4l1MPXq+M kUIgnSe35bWxbT6HrHpOfl/LGDVYkmaEBrs9GV/xK6ypKWVCutCu8/AkA5wD8xF85/aY UDdXnnLdr/5jd8eU0gXIxgB74MTvEpnaQMd8E= Received: by 10.224.105.26 with SMTP id r26mr10007093qao.0.1262387468717; Fri, 01 Jan 2010 15:11:08 -0800 (PST) Received: from weongyo ([174.35.1.224]) by mx.google.com with ESMTPS id 20sm14277465qyk.1.2010.01.01.15.11.06 (version=SSLv3 cipher=RC4-MD5); Fri, 01 Jan 2010 15:11:07 -0800 (PST) Received: by weongyo (sSMTP sendmail emulation); Fri, 1 Jan 2010 15:11:17 -0800 From: Weongyo Jeong Date: Fri, 1 Jan 2010 15:11:17 -0800 To: Alex Keda , Paul B Mahol , David Horn Message-ID: <20100101231116.GD1491@weongyo> Mail-Followup-To: Alex Keda , Paul B Mahol , David Horn , current@freebsd.org, Gonzalo Nemmi , Attilio Rao , Aditya Sarawgi , Andrea Di Pasquale References: <20091223035331.GA1293@weongyo> <4B3250E7.1000509@lissyara.su> <20091223201438.GD1293@weongyo> <4B32822D.30201@lissyara.su> <4B34E7E8.1040009@lissyara.su> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="fUYQa+Pmc3FrFX/N" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4B34E7E8.1040009@lissyara.su> User-Agent: Mutt/1.4.2.3i Organization: CDNetworks. X-Operation-Sytem: FreeBSD Cc: Attilio Rao , Aditya Sarawgi , Gonzalo Nemmi , current@freebsd.org, Andrea Di Pasquale Subject: Re: Call for Test and Review: bwn(4) - another Broadcom Wireless driver X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Weongyo Jeong List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2010 23:11:25 -0000 --fUYQa+Pmc3FrFX/N Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Fri, Dec 25, 2009 at 07:27:20PM +0300, Alex Keda wrote: > Alex Keda пишет: > >Weongyo Jeong пишет: > >>It's caused by unexpected SSB core. Could you please test with attached > >>patch with email and tell me the result? > >All OK > > > >ssb0: mem 0xc8000000-0xc8003fff > >irq 18 at device 0.0 on pci48 > >ssb0: unsupportted coreid 0x817 > >info: [drm] Num pipes: 1 > >bwn0 on ssb0 > >bwn0: WLAN (chipid 0x4311 rev 13) PHY (analog 4 type 2 rev 9) RADIO > >(manuf 0x17f ver 0x2050 rev 2) > >bwn0: DMA (64 bits) > >bwn0: [FILTER] > > > >scan - works. > >HP# ifconfig wlan0 scan > >SSID/MESH ID BSSID CHAN RATE S:N INT CAPS > >0x000000000 00:19:e1:00:e1:d0 1 54M -79:-95 100 ES WME > >Beeline_WiFi 00:19:e1:00:e1:d1 1 54M -79:-95 100 ES WME > >Beeline_WiF... 00:19:e1:00:e1:d2 1 54M -79:-95 100 EPS RSN WPA WME > >HP# > > > >but, I can test it with access point only through two days > so, it's work, but I have reproduce panic. > > I manually assign IP address: > # ifconfig wlan0 192.168.250.2 > then, run command: > # /etc/netstart > and I see: > ..... > wpa_supplicant[2084]: Failed to disable WPA in the driver > bwn0: bwn_newstate: RUN -> INIT > bwn0: TODO: bwn_leds_exit > bwn0: bwn_bt_disable TODO > Starting wpa_supplicant. > bwn0: firmware version ( rev 410 patch 2160 date 0x751a time 0x7c0a) > Kernel page fault with the following non-sleepable lock held: > exclusive sleep mutex bwn0 (network driver) r = 0 (0xffffff005a769010) > locked @/usr/src/sys/modules/bwn/../../dev/bwn/if_bwn.c:906 > KDB: stack backtrace: > db_trace_self_wrapper() at db_trace_self_wrapper+0x2a > _witness_sebugger() at _witness_debugger+0x2e > witness_warn() at witness_warn+0x2c2 > trap() at trap+0x2ce > calltrap() at calltrap+0x8 > --- trap 0xc, rip = 0xffffffff81516070, rsp = 0xffffff803ceeaa40, rbp = > 0xffffff803ceeaa80 --- > bwn_dma_setup() at bwn_dma_setup+0x10 > bwn_dma_init() at bwn_dma_init+0x32 > bwn_core_init() at bwn_core_init+0x40f > bwn_init_locked() at bwn_init_locked+0xae > bwn_ioctl() at bwn_ioctl+0xff > taskqueue_run() at taskqueue_run+0x91 > taskqueue_thread_loop() at taskqueue_thread_loop+0x3f > fork_exit() at fork_exit+0x12a > fork_tramponline() at fork_tramponline+0xe > --- trap 0, rip = 0, rsp = 0xffffff803ceead30, rbp = 0 --- > > Fatal trap 12: page fault while in kernel mode > cpuid = 1; apic id = 01 > fault virtual address = 0x0 > fault code = supervisor read data, page not present > instruction pointer = 0x20:0xffffffff81516070 > stack pointer = 0x28:0xffffff803ceeaa40 > frame pointer = 0x28:0xffffff803ceeaa80 > code segment = base 0x0, limit 0xfffff, type 0x1b > = DPL 0, pres 1, long 1, def32 0, gran 1 > processor eflags = interrupt enabled, resume, IOPL = 0 > current process = 0 (bwn0 taskq) > [thread pid 0 tid 100239 ] > Stopped at bwn_dma_setup+0x10: movq (%rax), %rax Just come back from vacation. Could you please test with attached patch? Additionally it could be downloaded at the following URL: http://people.freebsd.org/~weongyo/patch_bwn_20100101.diff regards, Weongyo Jeong --fUYQa+Pmc3FrFX/N Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="patch_bwn_20100101.diff" --- if_bwn.c 2009-12-22 16:32:53.000000000 -0800 +++ /mnt/t62/sys/dev/bwn/if_bwn.c 2010-01-01 14:45:43.000000000 -0800 @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2008 Weongyo Jeong + * Copyright (c) 2009-2010 Weongyo Jeong * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -792,6 +792,8 @@ struct ieee80211com *ic = ifp->if_l2com; int i; + sc->sc_flags |= BWN_FLAG_INVALID; + if (device_is_attached(sc->sc_dev)) { bwn_stop(sc, 1); callout_drain(&sc->sc_task_ch); @@ -2760,14 +2762,14 @@ if (mac->mac_status >= BWN_MAC_STATUS_INITED) { /* XXX FIXME opmode not based on VAP */ - memset(sc->sc_macaddr, 0, IEEE80211_ADDR_LEN); bwn_set_opmode(mac); bwn_set_macaddr(mac); } if (mac->mac_status >= BWN_MAC_STATUS_STARTED) bwn_core_stop(mac); - bwn_core_exit(mac); + if (sc->sc_flags & BWN_FLAG_INVALID) + bwn_core_exit(mac); sc->sc_rf_enabled = 0; ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); --fUYQa+Pmc3FrFX/N--