From owner-freebsd-wireless@FreeBSD.ORG Wed Jul 24 02:47:19 2013 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 5C1DCA15 for ; Wed, 24 Jul 2013 02:47:19 +0000 (UTC) (envelope-from ghw@7axu.com) Received: from mail-we0-f172.google.com (mail-we0-f172.google.com [74.125.82.172]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E8FDF232E for ; Wed, 24 Jul 2013 02:47:18 +0000 (UTC) Received: by mail-we0-f172.google.com with SMTP id t61so2810097wes.17 for ; Tue, 23 Jul 2013 19:47:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:x-gm-message-state; bh=QosrXn0G6rnfeY/p9nZBY9Da+2+/5TdrflyPRwmO4OI=; b=dCceGjAXJ88Ee7ZRErIElzUMJgbs6cT5lqByfw7GzYuK48HdYlm9sSPNbEXg8m4dhC oVkzrfIU7y6yBP9VDc1ZSo/eKHPtQw0Jx41RERth9QoNPYEiW2LLL2Akod54RZLS19kG nO1y8Miu8mVG3owAH+x2ff6hxNQ+733nuRhotYFXiOVri55x23jhgsUrL9HgGxxDgVCv fKyGmGc/Hl1m89LSnXPoxtc2w2LTHLeHJLWpNd5SpL1Tqcn+wzeMdLrDNRLZ5/XOnEIY gPj1eCgSmd0mDgARG9KJ8HGkB/2+7x8zxrAd1I9WGi7s710YYq5exv4gIEgDhX3rYEz7 fsyg== X-Received: by 10.194.216.99 with SMTP id op3mr25759326wjc.52.1374633612565; Tue, 23 Jul 2013 19:40:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.93.34 with HTTP; Tue, 23 Jul 2013 19:39:32 -0700 (PDT) X-Originating-IP: [54.249.112.206] In-Reply-To: References: <1374573600-2351360719.d37ada5f86@bliksem.vehosting.nl> <201307231220.52817.Daan@vitsch.nl> From: XiaoQI Ge Date: Wed, 24 Jul 2013 10:39:32 +0800 Message-ID: Subject: Re: My WLI-UC-GNM up crash To: Daan Vreeken Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQlCEIybiSRkAwfn+KRBzBZZOqdfh+K5HvNPBcoMEiX0Hk2BIe1NgPwiQsSP+HkIlHpBq7+e Cc: freebsd-arm@freebsd.org, freebsd-wireless@freebsd.org X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jul 2013 02:47:19 -0000 How do I debug it? Can provide useful information login: root Jul 24 18:27:31 FreeBSD login: ROOT LOGIN (root) ON ttyu0 FreeBSD 10.0-CURRENT (BBB) #4 r253585M: Wed Jul 24 17:07:53 CST 2013 [root@FreeBSD.ttyu0] ~ # ifconfig wlan create wlandev run0 wlan0: Ethernet address: 10:6f:3f:2b:fd:6d wlan0 [root@FreeBSD.ttyu0] ~ # ifconfig wlan0 up run0: firmware RT2870 ver. 0.236 loaded Fatal kernel mode data abort: 'Alignment Fault 1' trapframe: 0xde9e4d5c FSR=00000801, FAR=c282ffbb, spsr=00000013 r0 =c2831000, r1 =c282ffbb, r2 =c2831210, r3 =0000096c r4 =c2831024, r5 =c2831000, r6 =c05d9362, r7 =c2829800 r8 =00000014, r9 =c08144d8, r10=80001cce, r11=de9e4e10 r12=0000002e, ssp=de9e4da8, slr=00000000, pc =c045c510 [ thread pid 0 tid 100053 ] Stopped at ieee80211_radiotap_chan_change+0x90: strh r3, [r1] db> These two places modified: 2522 } 2523 2524 ant = run_maxrssi_chain(sc, rxwi); 2525 rssi = rxwi->rssi[ant]; 2526 nf = run_rssi2dbm(sc, rssi, ant); 2527 2528 m->m_pkthdr.rcvif = ifp; 2529 m->m_pkthdr.len = m->m_len = len; 2530 /* 2531 if (ni != NULL) { 2532 (void)ieee80211_input(ni, m, rssi, nf); 2533 ieee80211_free_node(ni); 2534 } else { 2535 (void)ieee80211_input_all(ic, m, rssi, nf); 2536 } 2537 */ 2538 /* 2539 * DAAN: fill-in tap header BEFORE calling ieee80211_input*() so the 2540 * user will see the actual data that belongs to THIS packet.. 2541 */ 2542 if (__predict_false(ieee80211_radiotap_active(ic))) { 2543 struct run_rx_radiotap_header *tap = &sc->sc_rxtap; 2544 2545 tap->wr_flags = 0; 2546 tap->wr_chan_freq = htole16(ic->ic_curchan->ic_freq); 2547 tap->wr_chan_flags = htole16(ic->ic_curchan->ic_flags); 2548 tap->wr_antsignal = rssi; 2549 tap->wr_antenna = ant; 2550 tap->wr_dbm_antsignal = run_rssi2dbm(sc, rssi, ant); 2551 tap->wr_rate = 2; /* in case it can't be found below */ 2552 phy = le16toh(rxwi->phy); 2553 switch (phy & RT2860_PHY_MODE) { 2554 case RT2860_PHY_CCK: 2555 switch ((phy & RT2860_PHY_MCS) & ~RT2860_PHY_SHPRE) { 2556 case 0: tap->wr_rate = 2; break; 2557 case 1: tap->wr_rate = 4; break; 2558 case 2: tap->wr_rate = 11; break; 2559 case 3: tap->wr_rate = 22; break; 2560 } 2561 if (phy & RT2860_PHY_SHPRE) 2562 tap->wr_flags |= IEEE80211_RADIOTAP_F_SHORTPRE; 2563 break; 2564 case RT2860_PHY_OFDM: 2565 switch (phy & RT2860_PHY_MCS) { 2566 case 0: tap->wr_rate = 12; break; 2567 case 1: tap->wr_rate = 18; break; 2568 case 2: tap->wr_rate = 24; break; 2569 case 3: tap->wr_rate = 36; break; 2570 case 4: tap->wr_rate = 48; break; 2571 case 5: tap->wr_rate = 72; break; 2572 case 6: tap->wr_rate = 96; break; 2573 case 7: tap->wr_rate = 108; break; 2574 } 2575 break; 2576 } 2577 } 2578 2579 if (ni != NULL) { 2580 (void)ieee80211_input(ni, m, rssi, nf); 2581 ieee80211_free_node(ni); 2582 } else { 2583 (void)ieee80211_input_all(ic, m, rssi, nf); 2584 } 2585 2586 } 2587 2588 static void Index: sys/vm/vm_map.c =================================================================== --- sys/vm/vm_map.c (revision 253514) +++ sys/vm/vm_map.c (working copy) @@ -239,8 +239,7 @@ vm_map_t map; map = (vm_map_t)mem; - map->nentries = 0; - map->size = 0; + memset(map, 0, sizeof(*map)); mtx_init(&map->system_mtx, "vm map (system)", NULL, MTX_DEF | MTX_DUPOK); sx_init(&map->lock, "vm map (user)"); return (0); -- Regards. By: XiaoQI Ge; PGP:8B09D5F7 WWW: https://www.7axu.com/ 2013/7/24 XiaoQI Ge : > I manually make up, is compiling the kernel > -- > Regards. > By: XiaoQI Ge; PGP:8B09D5F7 > WWW: https://www.7axu.com/ > > > > 2013/7/24 XiaoQI Ge : >> patch < /root/if_run_2013_01_19_radiotap_fix_only.diff appears to be invalid >> >> ] /usr/src/sys/dev/usb/wlan # patch < >> /root/if_run_2013_01_19_radiotap_fix_only.diff >> Hmm... Looks like a unified diff to me... >> The text leading up to this was: >> -------------------------- >> |--- if_run.c.fix1_vnet 2013-06-14 10:12:49.786774072 +0200 >> |+++ if_run.c.fix2_vnet_plus_radiotap 2013-06-14 10:15:34.890774314 +0200 >> -------------------------- >> File to patch: >> >> >> 2013/7/23 Daan Vreeken : >>> cd /usr/src/sys/dev/usb/wlan >> >> >> >> -- >> Regards. >> By: XiaoQI Ge; PGP:8B09D5F7 >> WWW: https://www.7axu.com/