From owner-freebsd-wireless@FreeBSD.ORG Sun May 20 03:29:25 2012 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 608C81065741 for ; Sun, 20 May 2012 03:29:25 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id 372418FC17 for ; Sun, 20 May 2012 03:29:25 +0000 (UTC) Received: by dadv36 with SMTP id v36so5831271dad.13 for ; Sat, 19 May 2012 20:29:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=xfToSsQtHx3QaDY0+n/4UFkeM9v1oCzl8xQT8obn9WI=; b=b62wbfrAyX7b6deC/EBVugt6BEpXTQtGO1c+S1lLOweer2Hy4n/pUJqvKaHdLC506v r86yaual0btDwhPGMnfaQslMRDkEv6k1wPo40DFozAFpohDXiCX/W6yTsK6cihctVmCT iMWXOOaS5yUxqwKfz/QhBRj3zLgP/X/nhMqGiT0oiHJpzQMFnmTzItPpMNNr8qT5Ly+C ZF8Vg/R/hvbT2y3o0GcRRPpHdomi2b3Zuq5LruUQCPdHWjPEM/7JJ7fWkl1yCbYrHgQp IBkrakc28H7JwNn7o4klWStBjRuyOizm6B/mZXu93p4ISduW63JcbGT1SDDYmalfQj+a qang== MIME-Version: 1.0 Received: by 10.68.201.169 with SMTP id kb9mr36172920pbc.101.1337484559123; Sat, 19 May 2012 20:29:19 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.142.203.2 with HTTP; Sat, 19 May 2012 20:29:19 -0700 (PDT) Date: Sat, 19 May 2012 20:29:19 -0700 X-Google-Sender-Auth: gznm_JHGmVb01UdbmGDrnV7Dwzg Message-ID: From: Adrian Chadd To: freebsd-wireless@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: request: please test ath(4) 11n on HEAD today X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 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: Sun, 20 May 2012 03:29:25 -0000 Hi all, I'd like to start working on fixing up software retransmission of frames and filtered frames support, in preparation for (much better) power save queue handling support. But I'd like to make sure that the current code doesn't have any odd, weird behaviour. Sure, scan with traffic and bgscan in general is still busted. But I haven't seen any other obviously weird and broken behaviour. I've also recently found/fixed a bunch of weird corner cases in software TX handling and retransmission handling. So I'd really appreciate it if people would test out ath(4) from -HEAD in both station and access point mode. I'd like to find and fix any issues with the wifi stack before I start working on the new queue handling code. Yes, that means I'd really appreciate feedback saying that you've tested it and it works for you. Thanks! Adrian From owner-freebsd-wireless@FreeBSD.ORG Sun May 20 18:49:06 2012 Return-Path: Delivered-To: freebsd-wireless@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66E1A106564A; Sun, 20 May 2012 18:49:06 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 3A2598FC14; Sun, 20 May 2012 18:49:06 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q4KIn6YF001865; Sun, 20 May 2012 18:49:06 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q4KIn6qK001861; Sun, 20 May 2012 18:49:06 GMT (envelope-from linimon) Date: Sun, 20 May 2012 18:49:06 GMT Message-Id: <201205201849.q4KIn6qK001861@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-wireless@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: kern/168170: [net80211] ieee80211_send_bar() doesn't complete correctly if there's a resource shortage X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 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: Sun, 20 May 2012 18:49:06 -0000 Synopsis: [net80211] ieee80211_send_bar() doesn't complete correctly if there's a resource shortage Responsible-Changed-From-To: freebsd-bugs->freebsd-wireless Responsible-Changed-By: linimon Responsible-Changed-When: Sun May 20 18:48:47 UTC 2012 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=168170 From owner-freebsd-wireless@FreeBSD.ORG Mon May 21 11:07:27 2012 Return-Path: Delivered-To: freebsd-wireless@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC1081065672 for ; Mon, 21 May 2012 11:07:27 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A5E9F8FC0C for ; Mon, 21 May 2012 11:07:27 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q4LB7RWi049295 for ; Mon, 21 May 2012 11:07:27 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q4LB7RAB049292 for freebsd-wireless@FreeBSD.org; Mon, 21 May 2012 11:07:27 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 21 May 2012 11:07:27 GMT Message-Id: <201205211107.q4LB7RAB049292@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-wireless@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-wireless@FreeBSD.org X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 21 May 2012 11:07:27 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/168170 wireless [net80211] ieee80211_send_bar() doesn't complete corre o kern/167870 wireless [ath] adhoc wifi client does not join an existing IBSS o kern/167834 wireless [ath] kickpcu; 'handled 0 packets' o kern/167828 wireless [iwn] iwn(4) doesn't recover automatically after firmw o kern/167798 wireless ifconfig(8): problem with "ifconfig list scan" command o kern/167491 wireless [ath] TID != hardware queue TID in ath_tx_aggr_comp_ag o kern/167113 wireless [ath] AR5210: "stuck" TX seems to be occuring, without o kern/167080 wireless [ath] channel switch on another VAP break channel setu o kern/166684 wireless [ath] [net80211] mgmtrate/mcastrate isn't updated base p kern/166642 wireless [ieee80211] [patch] in 802.11n mode for FreeBSD AP, ha o kern/166641 wireless [ieee80211] [patch] mbuf/cluster leak in AP mode in 80 p kern/166357 wireless [ath] 802.11n TX stall when the first frame in the BAW o kern/166286 wireless [net80211] [ath] initial switch to HT40 isn't causing p kern/166190 wireless [ath] TX hangs and frames stuck in TX queue o kern/166086 wireless [Patch][ath] Reflect state of rfkill switch in a sysct o kern/165969 wireless [ath] Slower performance in adhoc mode vs Client/AP mo o kern/165966 wireless [ath] ath0: device timeout on SMP machines due to race o kern/165895 wireless [ath] overly busy cabq can tie up all tx buffers o kern/165870 wireless [bwn] bwn driver does not attach on HP Pavilion dv9420 o kern/165866 wireless [ath] TX hangs, requiring a "scan" to properly reset t o kern/165849 wireless [ath] [hang] network ath driver freeze o kern/165595 wireless [ipw] ipw(4): Can't load firmare for ipw2200bg o kern/165543 wireless [ath] ath0 endless scanning of channels without connec o kern/165517 wireless [net80211] bgscan isn't triggered when invalid beacons o kern/165475 wireless [ath] operational mode change doesn't poke the underly o kern/165382 wireless [kernel] taskqueue_unblock doesn't unblock currently q o kern/165306 wireless [ath] race conditions between scanning and beacon time o kern/165220 wireless [ath] "ath_rx_tasklet: sc_inreset_cnt > 0; skipping" m o kern/165214 wireless [ieee80211] Kernel panic in ieee80211_output.c:2505 o kern/165212 wireless [ath] No WiFi on Acer Aspire One 751h (Atheros AR5BHB6 o kern/165149 wireless [ath] [net80211] Ping with data length more than iv_fr o kern/165146 wireless [net80211] Net802.11 Fragment number is assigned 1 (sh o kern/165060 wireless [ath] vap->iv_bss race conditions causing crashes insi o kern/165021 wireless [ath] ath device timeout during scan/attach, if wlan_c o kern/164951 wireless [ath] [patch] Problem build of if_ath driver with cert o kern/164721 wireless [ath] ath device timeouts o kern/164499 wireless [wi] [patch] if_wi needs fix for big endian architectu o kern/164382 wireless [ath] crash when down/deleting a vap - inside ieee8021 o kern/164365 wireless [iwi] iwi0: UP/DOWN in o bin/164102 wireless hostapd not configured for 802.11n o kern/163759 wireless [ath] ath(4) "stops working" in hostap mode o kern/163724 wireless [mwl] [patch] NULL check before dereference o kern/163719 wireless [ath] ath interface do not receive multicast o kern/163689 wireless [ath] TX timeouts when sending probe/mgmt frames durin o kern/163574 wireless [net80211] overly-frequent HT occupancy changes o kern/163573 wireless [ath] hostap mode TX buffer hang o kern/163559 wireless [ath] kernel panic AH_DEBUG o kern/163318 wireless [ath] ath(4) stops working p kern/163312 wireless [panic] [ath driver] kernel panic: page fault with ath o kern/163237 wireless [ath] AR5416 as HostAP. Delays among clients when a cl o kern/163082 wireless [ath] ar9285 diversity fixes o kern/162648 wireless [ath] AR9227 ADC DC calibration failure o kern/162647 wireless [ath] 11n TX aggregation session / TX hang o kern/161293 wireless [iwn] hang at startup when starting network o kern/161035 wireless [ieee80211] Incorrect number describing 11ng MCS rate o kern/160391 wireless [ieee80211] [patch] Panic in mesh mode o kern/160296 wireless [zyd] [panic] 802.11 usb device reboots system on 'ifc o misc/160176 wireless [mips] [panic] Kernel panic on AR7161 platform with AR o kern/157449 wireless [ath] MAC address conflict causes system to freeze o kern/157243 wireless [ath] investigate beacon TX (AP) / RX (STA) when under o kern/156904 wireless [ath] AR9285 antenna diversity algorithm is buggy and o kern/156884 wireless [ath] ath instablity o kern/156327 wireless [bwn] bwn driver causes 20%-50% packet loss o kern/156322 wireless [wpi] no ahdemo support for if_wpi o kern/156321 wireless [ath] ahdemo doesn't work with if_ath o kern/155498 wireless [ral] ral(4) needs to be resynced with OpenBSD's to ga o kern/155100 wireless [ath] ath driver on busy channel: "stuck beacon" p kern/154598 wireless [ath] Atheros 5424/2424 can't connect to WPA network o kern/154567 wireless [ath] ath(4) lot of bad series(0) o kern/154327 wireless [ath] AR5416 in station mode hangs when transmitting f o kern/154284 wireless [ath] Modern ath wifi cards (such as AR9285) have miss o kern/154153 wireless [ath] AR5213 + MIPS + WPA group key packet corruption o kern/153448 wireless [ath] ath networking device loses association after a o kern/152750 wireless [ath] ath0 lot of bad series hwrate o kern/151198 wireless [ath] ath/5416 fails bgscan with "ath0: ath_chan_set: o kern/149786 wireless [bwn] bwn on Dell Inspiron 1150: connections stall o kern/149516 wireless [ath] ath(4) hostap with fake MAC/BSSID results in sta o kern/149373 wireless [realtek/atheros]: None of my network card working o kern/148322 wireless [ath] Triggering atheros wifi beacon misses in hostap o kern/148317 wireless [ath] FreeBSD 7.x hostap memory leak in net80211 or At o kern/148078 wireless [ath] wireless networking stops functioning o kern/146426 wireless [mwl] 802.11n rates not possible on mwl o kern/146425 wireless [mwl] mwl dropping all packets during and after high u o kern/145826 wireless [panic] [ath] Unable to configure adhoc mode on ath0/w o kern/144987 wireless [wpi] [panic] injecting packets with wlaninject using o bin/144109 wireless hostapd(8) uses the MAC of the wireless interface, but o conf/143079 wireless hostapd(8) startup missing multi wlan functionality p kern/140567 wireless [ath] [patch] ath is not worked on my notebook PC o kern/140245 wireless [ath] [panic] Kernel panic during network activity on o kern/137592 wireless [ath] panic - 7-STABLE (Aug 7, 2009 UTC) crashes on ne p bin/137484 wireless [patch] Integer overflow in wpa_supplicant(8) base64 e o kern/136943 wireless [wpi] [lor] wpi0_com_lock / wpi0 o kern/136836 wireless [ath] atheros card stops functioning after about 12 ho o kern/132722 wireless [ath] Wifi ath0 associates fine with AP, but DHCP or I o bin/131549 wireless ifconfig(8) can't clear 'monitor' mode on the wireless o kern/126475 wireless [ath] [panic] ath pcmcia card inevitably panics under o kern/125721 wireless [ath] Terrible throughput/high ping latency with Ubiqu o kern/125617 wireless [ath] [panic] ath(4) related panic o kern/125501 wireless [ath] atheros cardbus driver hangs o kern/125332 wireless [ath] [panic] crash under any non-tiny networking unde o kern/124767 wireless [iwi] Wireless connection using iwi0 driver (Intel 220 o kern/124753 wireless [ieee80211] net80211 discards power-save queue packets o docs/120456 wireless ath(4) needs to specify requirement on wlan_scan_sta o kern/119513 wireless [ath] [irq] inserting dlink dwl-g630 wireless card res o kern/116747 wireless [ndis] FreeBSD 7.0-CURRENT crash with Dell TrueMobile f kern/105348 wireless [ath] ath device stopps TX 106 problems total. From owner-freebsd-wireless@FreeBSD.ORG Mon May 21 12:58:25 2012 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A4F67106566B; Mon, 21 May 2012 12:58:25 +0000 (UTC) (envelope-from jhugo@meraka.csir.co.za) Received: from marge.meraka.csir.co.za (marge.meraka.csir.co.za [IPv6:2001:4200:7000:3::1]) by mx1.freebsd.org (Postfix) with ESMTP id 3DA558FC08; Mon, 21 May 2012 12:58:21 +0000 (UTC) Received: from jeep.localnet (unknown [IPv6:2001:4200:7000:3:223:aeff:fea7:a3c2]) by marge.meraka.csir.co.za (Postfix) with ESMTP id E13DCD0CC00; Mon, 21 May 2012 14:58:08 +0200 (SAST) From: Johann Hugo To: Adrian Chadd Date: Mon, 21 May 2012 14:58:06 +0200 User-Agent: KMail/1.13.7 (FreeBSD/9.0-RELEASE; KDE/4.7.3; amd64; ; ) References: <201205181133.57403.jhugo@meraka.csir.co.za> In-Reply-To: X-KMail-Markup: true MIME-Version: 1.0 Message-Id: <201205211458.06399.jhugo@meraka.csir.co.za> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-wireless@freebsd.org Subject: Re: [ath] Degraded throughput - adhoc mode X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 21 May 2012 12:58:25 -0000 On Friday 18 May 2012 19:23:51 Adrian Chadd wrote: > Hi, > > Please check the output of the sample rate module - sysctl > dev.ath.X.sample_stats=1, then check dmesg. elardus:~ # sysctl dev.ath.2.sample_stats=1 dev.ath.2.sample_stats: 0 -> 0 elardus:~ # dmesg [00:21:a4:32:06:32] refcnt 4 static_rix 0 ratemask 0x0 [ 250] cur rix 0 (1 Mb ) since switch: packets 0 ticks 0 [ 250] last sample 0 cur sample 0 packets sent 0 [ 250] packets since sample 0 sample tt 0 [1600] cur rix 0 (1 Mb ) since switch: packets 0 ticks 0 [1600] last sample 0 cur sample 0 packets sent 0 [1600] packets since sample 0 sample tt 0 [00:21:a4:32:06:3c] refcnt 3 static_rix -1 ratemask 0xfcf [ 250] cur rix 7 (18 Mb ) since switch: packets 1 ticks 25922949 [ 250] last sample 9 cur sample -1 packets sent 674099 [ 250] packets since sample 6 sample tt 464 [1600] cur rix 9 (36 Mb ) since switch: packets 1 ticks 25919954 [1600] last sample 10 cur sample -1 packets sent 11017718 [1600] packets since sample 4 sample tt 672 [ 1 Mb : 250] 31:20 ( 64%) T 57 F 0 avg 4938 last 6625934 [ 1 Mb :1600] 123:98 ( 79%) T 198 F 0 avg 16723 last 203098 [ 2 Mb : 250] 2:2 (100%) T 2 F 0 avg 2064 last 8563311 [ 2 Mb :1600] 1:1 (100%) T 2 F 0 avg 15538 last 17316442 [ 5 Mb : 250] 59:58 ( 98%) T 96 F 0 avg 4528 last 4722129 [ 5 Mb :1600] 21:20 ( 95%) T 38 F 1 avg 6506 last 8563314 [11 Mb : 250] 81:78 ( 96%) T 179 F 0 avg 4128 last 93962 [11 Mb :1600] 355:341 ( 96%) T 547 F 0 avg 4633 last 82599 [12 Mb : 250] 16399:16353 ( 99%) T 18240 F 0 avg 1359 last 82047 [12 Mb :1600] 10027:9892 ( 98%) T 13312 F 0 avg 1513 last 19942 [18 Mb : 250] 51489:51386 ( 99%) T 56048 F 0 avg 578 last 1906 [18 Mb :1600] 57151:56687 ( 99%) T 69074 F 0 avg 1605 last 19904 [24 Mb : 250] 103198:103008 ( 99%) T 110475 F 0 avg 947 last 4447 [24 Mb :1600] 254328:252988 ( 99%) T 298502 F 0 avg 988 last 18101 [36 Mb : 250] 163897:163690 ( 99%) T 171966 F 0 avg 877 last 3967 [36 Mb :1600] 1429440:1426539 ( 99%) T 1536544 F 0 avg 942 last 4910 [48 Mb : 250] 195032:194854 ( 99%) T 204404 F 1 avg 1844 last 82317 [48 Mb :1600] 5528565:5524701 ( 99%) T 5986172 F 0 avg 1194 last 16940 [54 Mb : 250] 145001:144812 ( 99%) T 152999 F 2 avg 1614 last 203418 [54 Mb :1600] 3751938:3747594 ( 99%) T 4223608 F 6 avg 3436 last 203110 > > Which NICs are you using? dev.ath.2.%desc: Atheros 5413 sysctl with big counters: dev.ath.2.stats.rx_phy_err.31: 82410 dev.ath.2.stats.ast_rx_crcerr: 812069 dev.ath.2.stats.ast_rx_phyerr: 82480 dev.ath.2.stats.ast_tx_shortpre: 11694060 dev.ath.2.stats.ast_tx_qstop: 1514731 dev.ath.2.stats.ast_tx_longretry: 1151533 dev.ath.2.stats.ast_tx_raw: 15228 Another interesting thing is a rhythmic pattern for ping delays (ifconfig down/up fixes it) 16 bytes from fd9c:6829:597c:20:221:a4ff:fe32:63c, icmp_seq=180 hlim=64 time=2.963 ms 16 bytes from fd9c:6829:597c:20:221:a4ff:fe32:63c, icmp_seq=181 hlim=64 time=14.267 ms 16 bytes from fd9c:6829:597c:20:221:a4ff:fe32:63c, icmp_seq=182 hlim=64 time=26.009 ms 16 bytes from fd9c:6829:597c:20:221:a4ff:fe32:63c, icmp_seq=183 hlim=64 time=49.559 ms 16 bytes from fd9c:6829:597c:20:221:a4ff:fe32:63c, icmp_seq=184 hlim=64 time=1.763 ms 16 bytes from fd9c:6829:597c:20:221:a4ff:fe32:63c, icmp_seq=185 hlim=64 time=3.170 ms 16 bytes from fd9c:6829:597c:20:221:a4ff:fe32:63c, icmp_seq=186 hlim=64 time=81.034 ms 16 bytes from fd9c:6829:597c:20:221:a4ff:fe32:63c, icmp_seq=187 hlim=64 time=42.084 ms 16 bytes from fd9c:6829:597c:20:221:a4ff:fe32:63c, icmp_seq=188 hlim=64 time=65.945 ms 16 bytes from fd9c:6829:597c:20:221:a4ff:fe32:63c, icmp_seq=189 hlim=64 time=1.710 ms 16 bytes from fd9c:6829:597c:20:221:a4ff:fe32:63c, icmp_seq=190 hlim=64 time=10.702 ms 16 bytes from fd9c:6829:597c:20:221:a4ff:fe32:63c, icmp_seq=191 hlim=64 time=35.973 ms 16 bytes from fd9c:6829:597c:20:221:a4ff:fe32:63c, icmp_seq=192 hlim=64 time=59.943 ms 16 bytes from fd9c:6829:597c:20:221:a4ff:fe32:63c, icmp_seq=193 hlim=64 time=82.535 ms 16 bytes from fd9c:6829:597c:20:221:a4ff:fe32:63c, icmp_seq=194 hlim=64 time=3.309 ms 16 bytes from fd9c:6829:597c:20:221:a4ff:fe32:63c, icmp_seq=195 hlim=64 time=27.272 ms 16 bytes from fd9c:6829:597c:20:221:a4ff:fe32:63c, icmp_seq=196 hlim=64 time=51.926 ms Johann > > > > Adrian > > On 18 May 2012 02:33, Johann Hugo wrote: > > Hi > > > > We have an outdoor wifi mesh network with various atheros adapters > > configured in adhoc mode. (FreeBSD-9) > > > > We sometimes (randomly) get a wifi adapter that goes into a "slow-mo" > > mode, with degraded throughput, less than half. > > > > A simple ifconfig wlanX down/up fixes the problem. > > > > Before: (slow-mo) > > [jhugo@jeep] ~> scp /boot/kernel/kernel zeus.cids.org.za:/dev/null > > kernel 100% 15MB 445.7KB/s 00:34 > > > > After: > > [jhugo@jeep] ~> scp /boot/kernel/kernel coin@elardus:/dev/null > > kernel 100% 15MB 1.0MB/s 00:15 > > > > Here is a list of all the registers (athregs) that changed during the > > down/up. > > > > Register Before After > > RXDP 01200ea0 01200840 > > MIBC 00000001 00000000 > > SPC_0 00942a83 000c246a > > DMADBG0 88888898 88888888 > > DMADBG4 000000a0 00000000 > > DMADBG5 04000000 00000000 > > DMADBG6 00032000 00022000 > > DMADBG7 000140a0 00000000 > > D_SEQ 0000038a 000008c1 > > TIMER0 000071d8 00000064 > > TIMER1 00038eb0 00000310 > > TIMER2 01bb8c30 000002d0 > > TIMER3 000071b5 00000065 > > TSF_L32 ddc5e966 de252332 > > DEF_ANT 00000000 00000001 > > OBSERV1 00002898 00002888 > > LAST_TST ddc52219 de2473af > > ACK_FAIL 00000002 00000000 > > FCS_FAIL 00000000 00000001 > > TFCNT 0d8e4e2f 01e95fea > > RFCNT 157c4d09 015d5432 > > RCCNT 281c998e 03b5a65c > > CCCNT d4782107 0d5b4b5b > > QUIET1 0000717c 00000088 > > FILTOFDM 00ffffff 000001b8 > > FILTCCK 00ffffff 0000015e > > PHYCNT1 00bffe72 00bffe9f > > PHYCNT2 00bfff3f 00bfff4a > > > > Is there a wiki/docs on the web that explains what these registers mean ? > > The only thing I could find was this link. > > http://madwifi-project.org/wiki/DevDocs/AtherosRegisters > > > > Any other usefull info that I should capture the next time this happens ? > > > > Regards > > Johann > > _______________________________________________ > > freebsd-wireless@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-wireless > > To unsubscribe, send any mail to > > "freebsd-wireless-unsubscribe@freebsd.org" From owner-freebsd-wireless@FreeBSD.ORG Mon May 21 13:22:44 2012 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ACB37106566B for ; Mon, 21 May 2012 13:22:44 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id 7E9138FC08 for ; Mon, 21 May 2012 13:22:44 +0000 (UTC) Received: by dadv36 with SMTP id v36so7321268dad.13 for ; Mon, 21 May 2012 06:22:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=bQVd1IZ8Kos1CqCGJTx7zNYBBPB+C92ve4CmPnqUVYU=; b=Zy+dhRJPH8TlkBntkRBGnvPCNzd9b3dFjYA1QVQfSyOWspThtWBVKdO4QeokyZKG// VMWf07mDXDTJoMeIaLUUSDdAU0fd38asDL1d9DbmVJblxJuaLtcuWRKg7r+JHJjtZOu/ /X5T3uRgfyOYKZqc30NtnXuDqQRTk3OlKN8hKgOJEanwtx8xufcbYHruZudOND3ekyhQ 8Jzzs0f0TXTr2OdCrTNFqzfO49AA4Yvv1iMBCp84QvzDuaDwXM/CrFeOUCix+Ix+Ai/9 WlbcRgU0wLcfLLlPiImarI4B5iHqAhOq9vt6Ad27pAMmEG42AY4WhtvjKqqBP5RS1FR/ JLxQ== MIME-Version: 1.0 Received: by 10.68.201.169 with SMTP id kb9mr114672pbc.101.1337606564009; Mon, 21 May 2012 06:22:44 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.142.203.2 with HTTP; Mon, 21 May 2012 06:22:43 -0700 (PDT) In-Reply-To: <201205211458.06399.jhugo@meraka.csir.co.za> References: <201205181133.57403.jhugo@meraka.csir.co.za> <201205211458.06399.jhugo@meraka.csir.co.za> Date: Mon, 21 May 2012 06:22:43 -0700 X-Google-Sender-Auth: ityi1r8hhWLGPuj-2d5eDe89Qnc Message-ID: From: Adrian Chadd To: Johann Hugo Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-wireless@freebsd.org Subject: Re: [ath] Degraded throughput - adhoc mode X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 21 May 2012 13:22:44 -0000 Do you have both antennas connected? adrian From owner-freebsd-wireless@FreeBSD.ORG Mon May 21 13:31:15 2012 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7799E1065670; Mon, 21 May 2012 13:31:15 +0000 (UTC) (envelope-from jhugo@meraka.csir.co.za) Received: from marge.meraka.csir.co.za (marge.meraka.csir.co.za [146.64.28.1]) by mx1.freebsd.org (Postfix) with ESMTP id 5ADF38FC14; Mon, 21 May 2012 13:31:13 +0000 (UTC) Received: from jeep.localnet (unknown [IPv6:2001:4200:7000:3:223:aeff:fea7:a3c2]) by marge.meraka.csir.co.za (Postfix) with ESMTP id 41A3CD0CC01; Mon, 21 May 2012 15:31:11 +0200 (SAST) From: Johann Hugo To: Adrian Chadd Date: Mon, 21 May 2012 15:31:09 +0200 User-Agent: KMail/1.13.7 (FreeBSD/9.0-RELEASE; KDE/4.7.3; amd64; ; ) References: <201205181133.57403.jhugo@meraka.csir.co.za> <201205211458.06399.jhugo@meraka.csir.co.za> In-Reply-To: X-KMail-Markup: true MIME-Version: 1.0 Message-Id: <201205211531.09766.jhugo@meraka.csir.co.za> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-wireless@freebsd.org Subject: Re: [ath] Degraded throughput - adhoc mode X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 21 May 2012 13:31:15 -0000 On Monday 21 May 2012 15:22:43 Adrian Chadd wrote: > Do you have both antennas connected? > > > adrian No, we usually define them in /etc/sysctl.conf dev.ath.2.rxantenna=1 dev.ath.2.txantenna=1 dev.ath.2.diversity=0 I just had a look and it somehow changed. elardus:~ # sysctl dev.ath.2 | grep ant dev.ath.2.txantenna: 1 dev.ath.2.rxantenna: 0 Johann From owner-freebsd-wireless@FreeBSD.ORG Mon May 21 13:34:30 2012 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DB90F1065673; Mon, 21 May 2012 13:34:30 +0000 (UTC) (envelope-from jhugo@meraka.csir.co.za) Received: from marge.meraka.csir.co.za (marge.meraka.csir.co.za [146.64.28.1]) by mx1.freebsd.org (Postfix) with ESMTP id 66C1D8FC14; Mon, 21 May 2012 13:34:30 +0000 (UTC) Received: from jeep.localnet (unknown [IPv6:2001:4200:7000:3:223:aeff:fea7:a3c2]) by marge.meraka.csir.co.za (Postfix) with ESMTP id 1716FD0CC01; Mon, 21 May 2012 15:34:29 +0200 (SAST) From: Johann Hugo To: Adrian Chadd Date: Mon, 21 May 2012 15:34:26 +0200 User-Agent: KMail/1.13.7 (FreeBSD/9.0-RELEASE; KDE/4.7.3; amd64; ; ) References: <201205181133.57403.jhugo@meraka.csir.co.za> <201205211458.06399.jhugo@meraka.csir.co.za> In-Reply-To: X-KMail-Markup: true MIME-Version: 1.0 Message-Id: <201205211534.26990.jhugo@meraka.csir.co.za> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-wireless@freebsd.org Subject: Re: [ath] Degraded throughput - adhoc mode X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 21 May 2012 13:34:30 -0000 On Monday 21 May 2012 15:22:43 Adrian Chadd wrote: > Do you have both antennas connected? > > > adrian OK, dev.ath.2.rxantenna changed from 1 to 0 when I did the ifconfig wlan2 down/up Johann From owner-freebsd-wireless@FreeBSD.ORG Tue May 22 06:36:56 2012 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4DADF106566B for ; Tue, 22 May 2012 06:36:56 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id 2290E8FC12 for ; Tue, 22 May 2012 06:36:56 +0000 (UTC) Received: by dadv36 with SMTP id v36so8429899dad.13 for ; Mon, 21 May 2012 23:36:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=wpxB3mcmKPAdl4P4M3z+5+jsNxAf8f01CXtbx1aat+c=; b=vALQVsKp1WsbXN1+t80kuFqXIbiobqgTCDCUiQump+PjmeXIl4kBzFzBSaKmr5Csk4 9HYltNZTOozM/pkZy3Pwy8MzDfRq/uFDLSWYwMAB66QZSaetetJx588lWV2wC3E7p7v5 MntMs48mf2auWduC/KajpGHnXsJXrqglwFM45wQVRRXTbp7XvaQRYW0Ah5Qo41k3J7VP qeBwYt1TQDLkjoPbNzCI52OSob57jPMrS0c+r/ROLy11AJLy5OPSv4276RSNY5Cw0Kpd g0nfZ8PksAkQo87FS+AbzOCSHVAQZjNu9UtRlJ74J9dau5YmrhZFFt+KHw5bnr5iGzXZ 59KQ== MIME-Version: 1.0 Received: by 10.68.234.35 with SMTP id ub3mr76945310pbc.8.1337668609951; Mon, 21 May 2012 23:36:49 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.142.203.2 with HTTP; Mon, 21 May 2012 23:36:49 -0700 (PDT) Date: Mon, 21 May 2012 23:36:49 -0700 X-Google-Sender-Auth: -L8A8EgE9zZ9zCftrKo4_jfFo0U Message-ID: From: Adrian Chadd To: freebsd-wireless@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: [net80211] Fix some corner cases in BAR TX handling X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 22 May 2012 06:36:56 -0000 Hi, This patch fixes a couple of rather annoying corner cases that I've seen with BAR TX handling in ath(4). They showed up because I am using a very cut down set of buffers in ath(4) (128 tx and 128 rx) rather than the older number (512) and I can easily exhaust them whilst the TID is paused. I'll soon implement some changes which will leave a "reserved" set of frames for management - and if I can line all the stars up correctly, have the management frames go out on the highest priority TX queue. Specifically: * ieee80211_send_bar() disables the timer and doesn't restart it unless ic_raw_xmit() suceeds; * if the TX fails and the timeout occurs via bar_timeout(), it'll try calling ieee80211_send_bar() to retransmit - but if that fails, the timer will never occur. * Callbacks are only done via bar_tx_complete(), which is not called if ieee80211_send_bar() fails to queue any frames to the driver. * If the timer does get started again, BARPEND may have been cleared (due to a failed ieee80211_send_bar() attempt to call ic_raw_xmit()) and it won't actually be processed, causing the attempts to fail. Again. So to maintain some semblence of predicable behaviour, I've done the following: * The ic_bar_response() handler is called just before AMPDU is disabled, giving the driver a chance to be told that the max number of retries has been reached. I don't like how this is the only real way to know that the BAR TX attempt has totally failed; I'll worry about that later. * If a retransmit attempt fails, set BARPEND and restart the timer. I've verified that this fixes all the weird BAR TX stalls I've seen. Thanks, Adrian Index: net80211/ieee80211_ht.c =================================================================== --- net80211/ieee80211_ht.c (revision 235772) +++ net80211/ieee80211_ht.c (working copy) @@ -2166,6 +2166,9 @@ } } +/* XXX */ +static void bar_start_timer(struct ieee80211_tx_ampdu *tap); + static void bar_timeout(void *arg) { @@ -2184,11 +2187,34 @@ return; /* XXX ? */ if (tap->txa_attempts >= ieee80211_bar_maxtries) { + struct ieee80211com *ic = ni->ni_ic; + ni->ni_vap->iv_stats.is_ampdu_bar_tx_fail++; + /* + * If (at least) the last BAR TX timeout was due to + * an ieee80211_send_bar() failures, then we need + * to make sure we notify the driver that a BAR + * TX did occur and fail. This gives the driver + * a chance to undo any queue pause that may + * have occured. + */ + ic->ic_bar_response(ni, tap, 1); ieee80211_ampdu_stop(ni, tap, IEEE80211_REASON_TIMEOUT); } else { ni->ni_vap->iv_stats.is_ampdu_bar_tx_retry++; - ieee80211_send_bar(ni, tap, tap->txa_seqpending); + if (ieee80211_send_bar(ni, tap, tap->txa_seqpending) != 0) { + /* + * If ieee80211_send_bar() fails here, the + * timer may have stopped and/or the pending + * flag may be clear. Because of this, + * fake the BARPEND and reset the timer. + * A retransmission attempt will then occur + * during the next timeout. + */ + /* XXX locking */ + tap->txa_flags |= IEEE80211_AGGR_BARPEND; + bar_start_timer(tap); + } } } From owner-freebsd-wireless@FreeBSD.ORG Tue May 22 19:40:04 2012 Return-Path: Delivered-To: freebsd-wireless@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 29C7F1065676 for ; Tue, 22 May 2012 19:40:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 12ABA8FC14 for ; Tue, 22 May 2012 19:40:04 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q4MJe3OG020460 for ; Tue, 22 May 2012 19:40:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q4MJe32i020459; Tue, 22 May 2012 19:40:03 GMT (envelope-from gnats) Date: Tue, 22 May 2012 19:40:03 GMT Message-Id: <201205221940.q4MJe32i020459@freefall.freebsd.org> To: freebsd-wireless@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: kern/168170: commit references a PR X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service 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: Tue, 22 May 2012 19:40:04 -0000 The following reply was made to PR kern/168170; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/168170: commit references a PR Date: Tue, 22 May 2012 19:37:22 +0000 (UTC) Author: adrian Date: Tue May 22 19:37:12 2012 New Revision: 235801 URL: http://svn.freebsd.org/changeset/base/235801 Log: Fix some corner cases in the ieee80211_send_bar() handling. * If the first call succeeded but failed to transmit, a timer would reschedule it via bar_timeout(). Unfortunately bar_timeout() didn't check the return value from the ieee80211_send_bar() reattempt and if that failed (eg the driver ic_raw_xmit() failed), it would never re-arm the timer. * If BARPEND is cleared (which ieee80211_send_bar() will do if it can't TX), then re-arming the timer isn't enough - once bar_timeout() occurs, it'll see BARPEND is 0 and not run through the rest of the routine. So when rearming the timer, also set that flag. * If the TX wasn't occuring, bar_tx_complete() wouldn't be called and the driver callback wouldn't be called either. So the driver had no idea that the BAR TX attempt had failed. In the ath(4) case, TX would stay paused. (There's no callback to indicate that BAR TX had failed or not; only a "BAR TX was attempted". That's a separate, later problem.) So call the driver callback (ic_bar_response()) before the ADDBA session is torn down, so it has a chance of being notified that things didn't quite go to plan. I've verified that yes, this does suspend traffic for ath(4), retry BAR TX even if the driver is failing ic_raw_xmit(), and then eventually giving up and sending a DELBA. I'll address the "out of ath_buf" issue in ath(4) in a subsequent commit - this commit just fixes the edge case where any driver is (way) out of internal buffers/descriptors and fails frame TX. PR: kern/168170 Reviewed by: bschmidt MFC after: 1 month Modified: head/sys/net80211/ieee80211_ht.c Modified: head/sys/net80211/ieee80211_ht.c ============================================================================== --- head/sys/net80211/ieee80211_ht.c Tue May 22 18:31:56 2012 (r235800) +++ head/sys/net80211/ieee80211_ht.c Tue May 22 19:37:12 2012 (r235801) @@ -2166,6 +2166,9 @@ ieee80211_ampdu_stop(struct ieee80211_no } } +/* XXX */ +static void bar_start_timer(struct ieee80211_tx_ampdu *tap); + static void bar_timeout(void *arg) { @@ -2184,11 +2187,34 @@ bar_timeout(void *arg) return; /* XXX ? */ if (tap->txa_attempts >= ieee80211_bar_maxtries) { + struct ieee80211com *ic = ni->ni_ic; + ni->ni_vap->iv_stats.is_ampdu_bar_tx_fail++; + /* + * If (at least) the last BAR TX timeout was due to + * an ieee80211_send_bar() failures, then we need + * to make sure we notify the driver that a BAR + * TX did occur and fail. This gives the driver + * a chance to undo any queue pause that may + * have occured. + */ + ic->ic_bar_response(ni, tap, 1); ieee80211_ampdu_stop(ni, tap, IEEE80211_REASON_TIMEOUT); } else { ni->ni_vap->iv_stats.is_ampdu_bar_tx_retry++; - ieee80211_send_bar(ni, tap, tap->txa_seqpending); + if (ieee80211_send_bar(ni, tap, tap->txa_seqpending) != 0) { + /* + * If ieee80211_send_bar() fails here, the + * timer may have stopped and/or the pending + * flag may be clear. Because of this, + * fake the BARPEND and reset the timer. + * A retransmission attempt will then occur + * during the next timeout. + */ + /* XXX locking */ + tap->txa_flags |= IEEE80211_AGGR_BARPEND; + bar_start_timer(tap); + } } } _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-freebsd-wireless@FreeBSD.ORG Wed May 23 18:59:13 2012 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AD513106566B; Wed, 23 May 2012 18:59:13 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 660028FC08; Wed, 23 May 2012 18:59:13 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so11130023pbb.13 for ; Wed, 23 May 2012 11:59:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=vVYjv0QzAdm5M3QDNHH/v/SeoXoxBw2Hj6KMa23pfzo=; b=NsgayaLIhqrrWiAz6mFDnI73GTWvvxEHg8FB/FFwEYg/zhvOteeOdRWUeLnWS2pFwR 5bBaMWCrEC0xc7iZFCEsluzDPm3MUL1DcASWZDva+XoeocFQof0AouDRVWXnjYSWI06y H6jHrvS6XzG393JC4DjDJSeamDWrWJpjZeZNqs1eC0tEcRh2i1qOoBY9vc/AH247zBWL Ag3qsG68LKXmXmXtDXT1pAeUpxqwepfPxuj5LvebO/rh4U2G18KXNADMWQo2E9Ok2o2i EL++G9D99z62fSCh11aPA7J3jc5jElySkK8E36ee10w4KTER2ZD63QU9gEv0lGWu5lKM W+hQ== MIME-Version: 1.0 Received: by 10.68.204.165 with SMTP id kz5mr5599241pbc.80.1337799553064; Wed, 23 May 2012 11:59:13 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.142.203.2 with HTTP; Wed, 23 May 2012 11:59:12 -0700 (PDT) In-Reply-To: <201204221854.q3MIsqPg052441@svn.freebsd.org> References: <201204221854.q3MIsqPg052441@svn.freebsd.org> Date: Wed, 23 May 2012 11:59:12 -0700 X-Google-Sender-Auth: 2VzkJDhMYmc7fH8iUCSd2ytghNU Message-ID: From: Adrian Chadd To: Nathan Whitehorn Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-wireless@freebsd.org Subject: Re: svn commit: r234579 - in head/sys/powerpc: include mpc85xx powerpc X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 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, 23 May 2012 18:59:13 -0000 Hi Nathan, Would you please nag me to make sure I add explicit write barrier handling to ath / ath_hal? It's needed for USB support for some chips that use the HAL (performance reasons) and I can basically re-use exactly the same thing. We could then "extend" the bus API to allow a driver to say they implement correct bus coherence hooks, so don't just call sync on every write. Thanks, Adrian On 22 April 2012 11:54, Nathan Whitehorn wrote: > Author: nwhitehorn > Date: Sun Apr 22 18:54:51 2012 > New Revision: 234579 > URL: http://svn.freebsd.org/changeset/base/234579 > > Log: > =A0Replace eieio; sync for creating bus-space memory barriers with sync. > =A0sync performs a strict superset of the functions of eieio, so using bo= th > =A0is redundant. While here, expand bus barriers to all bus_space operati= ons, > =A0since many drivers do not correctly use bus_space_barrier(). > > =A0In principle, we can also replace sync just with eieio, for a signific= ant > =A0performance increase, but it remains to be seen whether any poorly-wri= tten > =A0drivers currently depend on the side effects of sync to properly funct= ion. > > =A0MFC after: =A0 =A01 week > > Modified: > =A0head/sys/powerpc/include/pio.h > =A0head/sys/powerpc/mpc85xx/mpc85xx.c > =A0head/sys/powerpc/powerpc/bus_machdep.c > > Modified: head/sys/powerpc/include/pio.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/powerpc/include/pio.h =A0 =A0 =A0Sun Apr 22 18:51:38 2012 = =A0 =A0 =A0 =A0(r234578) > +++ head/sys/powerpc/include/pio.h =A0 =A0 =A0Sun Apr 22 18:54:51 2012 = =A0 =A0 =A0 =A0(r234579) > @@ -39,46 +39,52 @@ > =A0* I/O macros. > =A0*/ > > +/* > + * Note: this should be eieio, but many drivers expect ordering with > + * main storage too. > + */ > +#define powerpc_iomb() __asm __volatile("sync" : : : "memory") > + > =A0static __inline void > =A0__outb(volatile u_int8_t *a, u_int8_t v) > =A0{ > =A0 =A0 =A0 =A0*a =3D v; > - =A0 =A0 =A0 __asm__ volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static __inline void > =A0__outw(volatile u_int16_t *a, u_int16_t v) > =A0{ > =A0 =A0 =A0 =A0*a =3D v; > - =A0 =A0 =A0 __asm__ volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static __inline void > =A0__outl(volatile u_int32_t *a, u_int32_t v) > =A0{ > =A0 =A0 =A0 =A0*a =3D v; > - =A0 =A0 =A0 __asm__ volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static __inline void > =A0__outll(volatile u_int64_t *a, u_int64_t v) > =A0{ > =A0 =A0 =A0 =A0*a =3D v; > - =A0 =A0 =A0 __asm__ volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static __inline void > =A0__outwrb(volatile u_int16_t *a, u_int16_t v) > =A0{ > =A0 =A0 =A0 =A0__asm__ volatile("sthbrx %0, 0, %1" :: "r"(v), "r"(a)); > - =A0 =A0 =A0 __asm__ volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static __inline void > =A0__outlrb(volatile u_int32_t *a, u_int32_t v) > =A0{ > =A0 =A0 =A0 =A0__asm__ volatile("stwbrx %0, 0, %1" :: "r"(v), "r"(a)); > - =A0 =A0 =A0 __asm__ volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static __inline u_int8_t > @@ -87,7 +93,7 @@ __inb(volatile u_int8_t *a) > =A0 =A0 =A0 =A0u_int8_t _v_; > > =A0 =A0 =A0 =A0_v_ =3D *a; > - =A0 =A0 =A0 __asm__ volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0 =A0 =A0 =A0return _v_; > =A0} > > @@ -97,7 +103,7 @@ __inw(volatile u_int16_t *a) > =A0 =A0 =A0 =A0u_int16_t _v_; > > =A0 =A0 =A0 =A0_v_ =3D *a; > - =A0 =A0 =A0 __asm__ volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0 =A0 =A0 =A0return _v_; > =A0} > > @@ -107,7 +113,7 @@ __inl(volatile u_int32_t *a) > =A0 =A0 =A0 =A0u_int32_t _v_; > > =A0 =A0 =A0 =A0_v_ =3D *a; > - =A0 =A0 =A0 __asm__ volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0 =A0 =A0 =A0return _v_; > =A0} > > @@ -117,7 +123,7 @@ __inll(volatile u_int64_t *a) > =A0 =A0 =A0 =A0u_int64_t _v_; > > =A0 =A0 =A0 =A0_v_ =3D *a; > - =A0 =A0 =A0 __asm__ volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0 =A0 =A0 =A0return _v_; > =A0} > > @@ -127,7 +133,7 @@ __inwrb(volatile u_int16_t *a) > =A0 =A0 =A0 =A0u_int16_t _v_; > > =A0 =A0 =A0 =A0__asm__ volatile("lhbrx %0, 0, %1" : "=3Dr"(_v_) : "r"(a))= ; > - =A0 =A0 =A0 __asm__ volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0 =A0 =A0 =A0return _v_; > =A0} > > @@ -137,7 +143,7 @@ __inlrb(volatile u_int32_t *a) > =A0 =A0 =A0 =A0u_int32_t _v_; > > =A0 =A0 =A0 =A0__asm__ volatile("lwbrx %0, 0, %1" : "=3Dr"(_v_) : "r"(a))= ; > - =A0 =A0 =A0 __asm__ volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0 =A0 =A0 =A0return _v_; > =A0} > > @@ -175,7 +181,7 @@ __outsb(volatile u_int8_t *a, const u_in > =A0{ > =A0 =A0 =A0 =A0while (c--) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*a =3D *s++; > - =A0 =A0 =A0 __asm__ volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static __inline void > @@ -183,7 +189,7 @@ __outsw(volatile u_int16_t *a, const u_i > =A0{ > =A0 =A0 =A0 =A0while (c--) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*a =3D *s++; > - =A0 =A0 =A0 __asm__ volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static __inline void > @@ -191,7 +197,7 @@ __outsl(volatile u_int32_t *a, const u_i > =A0{ > =A0 =A0 =A0 =A0while (c--) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*a =3D *s++; > - =A0 =A0 =A0 __asm__ volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static __inline void > @@ -199,7 +205,7 @@ __outsll(volatile u_int64_t *a, const u_ > =A0{ > =A0 =A0 =A0 =A0while (c--) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*a =3D *s++; > - =A0 =A0 =A0 __asm__ volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static __inline void > @@ -207,7 +213,7 @@ __outswrb(volatile u_int16_t *a, const u > =A0{ > =A0 =A0 =A0 =A0while (c--) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0__asm__ volatile("sthbrx %0, 0, %1" :: "r"= (*s++), "r"(a)); > - =A0 =A0 =A0 __asm__ volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static __inline void > @@ -215,7 +221,7 @@ __outslrb(volatile u_int32_t *a, const u > =A0{ > =A0 =A0 =A0 =A0while (c--) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0__asm__ volatile("stwbrx %0, 0, %1" :: "r"= (*s++), "r"(a)); > - =A0 =A0 =A0 __asm__ volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static __inline void > @@ -223,7 +229,7 @@ __insb(volatile u_int8_t *a, u_int8_t *d > =A0{ > =A0 =A0 =A0 =A0while (c--) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*d++ =3D *a; > - =A0 =A0 =A0 __asm__ volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static __inline void > @@ -231,7 +237,7 @@ __insw(volatile u_int16_t *a, u_int16_t > =A0{ > =A0 =A0 =A0 =A0while (c--) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*d++ =3D *a; > - =A0 =A0 =A0 __asm__ volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static __inline void > @@ -239,7 +245,7 @@ __insl(volatile u_int32_t *a, u_int32_t > =A0{ > =A0 =A0 =A0 =A0while (c--) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*d++ =3D *a; > - =A0 =A0 =A0 __asm__ volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static __inline void > @@ -247,7 +253,7 @@ __insll(volatile u_int64_t *a, u_int64_t > =A0{ > =A0 =A0 =A0 =A0while (c--) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*d++ =3D *a; > - =A0 =A0 =A0 __asm__ volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static __inline void > @@ -255,7 +261,7 @@ __inswrb(volatile u_int16_t *a, u_int16_ > =A0{ > =A0 =A0 =A0 =A0while (c--) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0__asm__ volatile("lhbrx %0, 0, %1" : "=3Dr= "(*d++) : "r"(a)); > - =A0 =A0 =A0 __asm__ volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static __inline void > @@ -263,7 +269,7 @@ __inslrb(volatile u_int32_t *a, u_int32_ > =A0{ > =A0 =A0 =A0 =A0while (c--) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0__asm__ volatile("lwbrx %0, 0, %1" : "=3Dr= "(*d++) : "r"(a)); > - =A0 =A0 =A0 __asm__ volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0#define =A0 =A0 =A0 =A0outsb(a,s,c) =A0 =A0(__outsb((volatile u_int8_t= *)(a), s, c)) > > Modified: head/sys/powerpc/mpc85xx/mpc85xx.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/powerpc/mpc85xx/mpc85xx.c =A0Sun Apr 22 18:51:38 2012 =A0 = =A0 =A0 =A0(r234578) > +++ head/sys/powerpc/mpc85xx/mpc85xx.c =A0Sun Apr 22 18:54:51 2012 =A0 = =A0 =A0 =A0(r234579) > @@ -60,7 +60,7 @@ ccsr_write4(uintptr_t addr, uint32_t val > =A0 =A0 =A0 =A0volatile uint32_t *ptr =3D (void *)addr; > > =A0 =A0 =A0 =A0*ptr =3D val; > - =A0 =A0 =A0 __asm __volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0int > > Modified: head/sys/powerpc/powerpc/bus_machdep.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/powerpc/powerpc/bus_machdep.c =A0 =A0 =A0Sun Apr 22 18:51:38= 2012 =A0 =A0 =A0 =A0(r234578) > +++ head/sys/powerpc/powerpc/bus_machdep.c =A0 =A0 =A0Sun Apr 22 18:54:51= 2012 =A0 =A0 =A0 =A0(r234579) > @@ -169,7 +169,8 @@ static void > =A0bs_gen_barrier(bus_space_handle_t bsh __unused, bus_size_t ofs __unuse= d, > =A0 =A0 bus_size_t size __unused, int flags __unused) > =A0{ > - =A0 =A0 =A0 __asm __volatile("eieio; sync" : : : "memory"); > + > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0/* > @@ -183,6 +184,7 @@ bs_be_rs_1(bus_space_handle_t bsh, bus_s > > =A0 =A0 =A0 =A0addr =3D __ppc_ba(bsh, ofs); > =A0 =A0 =A0 =A0res =3D *addr; > + =A0 =A0 =A0 powerpc_iomb(); > =A0 =A0 =A0 =A0CTR4(KTR_BE_IO, "%s(bsh=3D%#x, ofs=3D%#x) =3D %#x", __func= __, bsh, ofs, res); > =A0 =A0 =A0 =A0return (res); > =A0} > @@ -195,6 +197,7 @@ bs_be_rs_2(bus_space_handle_t bsh, bus_s > > =A0 =A0 =A0 =A0addr =3D __ppc_ba(bsh, ofs); > =A0 =A0 =A0 =A0res =3D *addr; > + =A0 =A0 =A0 powerpc_iomb(); > =A0 =A0 =A0 =A0CTR4(KTR_BE_IO, "%s(bsh=3D%#x, ofs=3D%#x) =3D %#x", __func= __, bsh, ofs, res); > =A0 =A0 =A0 =A0return (res); > =A0} > @@ -207,6 +210,7 @@ bs_be_rs_4(bus_space_handle_t bsh, bus_s > > =A0 =A0 =A0 =A0addr =3D __ppc_ba(bsh, ofs); > =A0 =A0 =A0 =A0res =3D *addr; > + =A0 =A0 =A0 powerpc_iomb(); > =A0 =A0 =A0 =A0CTR4(KTR_BE_IO, "%s(bsh=3D%#x, ofs=3D%#x) =3D %#x", __func= __, bsh, ofs, res); > =A0 =A0 =A0 =A0return (res); > =A0} > @@ -219,6 +223,7 @@ bs_be_rs_8(bus_space_handle_t bsh, bus_s > > =A0 =A0 =A0 =A0addr =3D __ppc_ba(bsh, ofs); > =A0 =A0 =A0 =A0res =3D *addr; > + =A0 =A0 =A0 powerpc_iomb(); > =A0 =A0 =A0 =A0return (res); > =A0} > > @@ -253,7 +258,7 @@ bs_be_rr_1(bus_space_handle_t bsh, bus_s > > =A0 =A0 =A0 =A0while (cnt--) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*addr++ =3D *s++; > - =A0 =A0 =A0 __asm __volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static void > @@ -263,7 +268,7 @@ bs_be_rr_2(bus_space_handle_t bsh, bus_s > > =A0 =A0 =A0 =A0while (cnt--) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*addr++ =3D *s++; > - =A0 =A0 =A0 __asm __volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static void > @@ -273,7 +278,7 @@ bs_be_rr_4(bus_space_handle_t bsh, bus_s > > =A0 =A0 =A0 =A0while (cnt--) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*addr++ =3D *s++; > - =A0 =A0 =A0 __asm __volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static void > @@ -283,7 +288,7 @@ bs_be_rr_8(bus_space_handle_t bsh, bus_s > > =A0 =A0 =A0 =A0while (cnt--) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*addr++ =3D *s++; > - =A0 =A0 =A0 __asm __volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static void > @@ -293,7 +298,7 @@ bs_be_ws_1(bus_space_handle_t bsh, bus_s > > =A0 =A0 =A0 =A0addr =3D __ppc_ba(bsh, ofs); > =A0 =A0 =A0 =A0*addr =3D val; > - =A0 =A0 =A0 __asm __volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0 =A0 =A0 =A0CTR4(KTR_BE_IO, "%s(bsh=3D%#x, ofs=3D%#x, val=3D%#x)", __f= unc__, bsh, ofs, val); > =A0} > > @@ -304,7 +309,7 @@ bs_be_ws_2(bus_space_handle_t bsh, bus_s > > =A0 =A0 =A0 =A0addr =3D __ppc_ba(bsh, ofs); > =A0 =A0 =A0 =A0*addr =3D val; > - =A0 =A0 =A0 __asm __volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0 =A0 =A0 =A0CTR4(KTR_BE_IO, "%s(bsh=3D%#x, ofs=3D%#x, val=3D%#x)", __f= unc__, bsh, ofs, val); > =A0} > > @@ -315,7 +320,7 @@ bs_be_ws_4(bus_space_handle_t bsh, bus_s > > =A0 =A0 =A0 =A0addr =3D __ppc_ba(bsh, ofs); > =A0 =A0 =A0 =A0*addr =3D val; > - =A0 =A0 =A0 __asm __volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0 =A0 =A0 =A0CTR4(KTR_BE_IO, "%s(bsh=3D%#x, ofs=3D%#x, val=3D%#x)", __f= unc__, bsh, ofs, val); > =A0} > > @@ -326,7 +331,7 @@ bs_be_ws_8(bus_space_handle_t bsh, bus_s > > =A0 =A0 =A0 =A0addr =3D __ppc_ba(bsh, ofs); > =A0 =A0 =A0 =A0*addr =3D val; > - =A0 =A0 =A0 __asm __volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static void > @@ -365,7 +370,7 @@ bs_be_wr_1(bus_space_handle_t bsh, bus_s > > =A0 =A0 =A0 =A0while (cnt--) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*d++ =3D *addr++; > - =A0 =A0 =A0 __asm __volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static void > @@ -376,7 +381,7 @@ bs_be_wr_2(bus_space_handle_t bsh, bus_s > > =A0 =A0 =A0 =A0while (cnt--) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*d++ =3D *addr++; > - =A0 =A0 =A0 __asm __volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static void > @@ -387,7 +392,7 @@ bs_be_wr_4(bus_space_handle_t bsh, bus_s > > =A0 =A0 =A0 =A0while (cnt--) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*d++ =3D *addr++; > - =A0 =A0 =A0 __asm __volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static void > @@ -398,7 +403,7 @@ bs_be_wr_8(bus_space_handle_t bsh, bus_s > > =A0 =A0 =A0 =A0while (cnt--) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*d++ =3D *addr++; > - =A0 =A0 =A0 __asm __volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static void > @@ -408,7 +413,7 @@ bs_be_sm_1(bus_space_handle_t bsh, bus_s > > =A0 =A0 =A0 =A0while (cnt--) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*d =3D val; > - =A0 =A0 =A0 __asm __volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static void > @@ -418,7 +423,7 @@ bs_be_sm_2(bus_space_handle_t bsh, bus_s > > =A0 =A0 =A0 =A0while (cnt--) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*d =3D val; > - =A0 =A0 =A0 __asm __volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static void > @@ -428,7 +433,7 @@ bs_be_sm_4(bus_space_handle_t bsh, bus_s > > =A0 =A0 =A0 =A0while (cnt--) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*d =3D val; > - =A0 =A0 =A0 __asm __volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static void > @@ -438,7 +443,7 @@ bs_be_sm_8(bus_space_handle_t bsh, bus_s > > =A0 =A0 =A0 =A0while (cnt--) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*d =3D val; > - =A0 =A0 =A0 __asm __volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static void > @@ -448,7 +453,7 @@ bs_be_sr_1(bus_space_handle_t bsh, bus_s > > =A0 =A0 =A0 =A0while (cnt--) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*d++ =3D val; > - =A0 =A0 =A0 __asm __volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static void > @@ -458,7 +463,7 @@ bs_be_sr_2(bus_space_handle_t bsh, bus_s > > =A0 =A0 =A0 =A0while (cnt--) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*d++ =3D val; > - =A0 =A0 =A0 __asm __volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static void > @@ -468,7 +473,7 @@ bs_be_sr_4(bus_space_handle_t bsh, bus_s > > =A0 =A0 =A0 =A0while (cnt--) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*d++ =3D val; > - =A0 =A0 =A0 __asm __volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static void > @@ -478,7 +483,7 @@ bs_be_sr_8(bus_space_handle_t bsh, bus_s > > =A0 =A0 =A0 =A0while (cnt--) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*d++ =3D val; > - =A0 =A0 =A0 __asm __volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0/* > @@ -492,7 +497,7 @@ bs_le_rs_1(bus_space_handle_t bsh, bus_s > > =A0 =A0 =A0 =A0addr =3D __ppc_ba(bsh, ofs); > =A0 =A0 =A0 =A0res =3D *addr; > - =A0 =A0 =A0 __asm __volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0 =A0 =A0 =A0CTR4(KTR_LE_IO, "%s(bsh=3D%#x, ofs=3D%#x) =3D %#x", __func= __, bsh, ofs, res); > =A0 =A0 =A0 =A0return (res); > =A0} > @@ -505,7 +510,7 @@ bs_le_rs_2(bus_space_handle_t bsh, bus_s > > =A0 =A0 =A0 =A0addr =3D __ppc_ba(bsh, ofs); > =A0 =A0 =A0 =A0__asm __volatile("lhbrx %0, 0, %1" : "=3Dr"(res) : "r"(add= r)); > - =A0 =A0 =A0 __asm __volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0 =A0 =A0 =A0CTR4(KTR_LE_IO, "%s(bsh=3D%#x, ofs=3D%#x) =3D %#x", __func= __, bsh, ofs, res); > =A0 =A0 =A0 =A0return (res); > =A0} > @@ -518,7 +523,7 @@ bs_le_rs_4(bus_space_handle_t bsh, bus_s > > =A0 =A0 =A0 =A0addr =3D __ppc_ba(bsh, ofs); > =A0 =A0 =A0 =A0__asm __volatile("lwbrx %0, 0, %1" : "=3Dr"(res) : "r"(add= r)); > - =A0 =A0 =A0 __asm __volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0 =A0 =A0 =A0CTR4(KTR_LE_IO, "%s(bsh=3D%#x, ofs=3D%#x) =3D %#x", __func= __, bsh, ofs, res); > =A0 =A0 =A0 =A0return (res); > =A0} > @@ -560,7 +565,7 @@ bs_le_rr_1(bus_space_handle_t bsh, bus_s > > =A0 =A0 =A0 =A0while (cnt--) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*addr++ =3D *s++; > - =A0 =A0 =A0 __asm __volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static void > @@ -570,7 +575,7 @@ bs_le_rr_2(bus_space_handle_t bsh, bus_s > > =A0 =A0 =A0 =A0while (cnt--) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*addr++ =3D in16rb(s++); > - =A0 =A0 =A0 __asm __volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static void > @@ -580,7 +585,7 @@ bs_le_rr_4(bus_space_handle_t bsh, bus_s > > =A0 =A0 =A0 =A0while (cnt--) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*addr++ =3D in32rb(s++); > - =A0 =A0 =A0 __asm __volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static void > @@ -596,6 +601,7 @@ bs_le_ws_1(bus_space_handle_t bsh, bus_s > > =A0 =A0 =A0 =A0addr =3D __ppc_ba(bsh, ofs); > =A0 =A0 =A0 =A0*addr =3D val; > + =A0 =A0 =A0 powerpc_iomb(); > =A0 =A0 =A0 =A0CTR4(KTR_LE_IO, "%s(bsh=3D%#x, ofs=3D%#x, val=3D%#x)", __f= unc__, bsh, ofs, val); > =A0} > > @@ -606,6 +612,7 @@ bs_le_ws_2(bus_space_handle_t bsh, bus_s > > =A0 =A0 =A0 =A0addr =3D __ppc_ba(bsh, ofs); > =A0 =A0 =A0 =A0__asm __volatile("sthbrx %0, 0, %1" :: "r"(val), "r"(addr)= ); > + =A0 =A0 =A0 powerpc_iomb(); > =A0 =A0 =A0 =A0CTR4(KTR_LE_IO, "%s(bsh=3D%#x, ofs=3D%#x, val=3D%#x)", __f= unc__, bsh, ofs, val); > =A0} > > @@ -616,6 +623,7 @@ bs_le_ws_4(bus_space_handle_t bsh, bus_s > > =A0 =A0 =A0 =A0addr =3D __ppc_ba(bsh, ofs); > =A0 =A0 =A0 =A0__asm __volatile("stwbrx %0, 0, %1" :: "r"(val), "r"(addr)= ); > + =A0 =A0 =A0 powerpc_iomb(); > =A0 =A0 =A0 =A0CTR4(KTR_LE_IO, "%s(bsh=3D%#x, ofs=3D%#x, val=3D%#x)", __f= unc__, bsh, ofs, val); > =A0} > > @@ -661,7 +669,7 @@ bs_le_wr_1(bus_space_handle_t bsh, bus_s > > =A0 =A0 =A0 =A0while (cnt--) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*d++ =3D *addr++; > - =A0 =A0 =A0 __asm __volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static void > @@ -672,7 +680,7 @@ bs_le_wr_2(bus_space_handle_t bsh, bus_s > > =A0 =A0 =A0 =A0while (cnt--) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0out16rb(d++, *addr++); > - =A0 =A0 =A0 __asm __volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static void > @@ -683,7 +691,7 @@ bs_le_wr_4(bus_space_handle_t bsh, bus_s > > =A0 =A0 =A0 =A0while (cnt--) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0out32rb(d++, *addr++); > - =A0 =A0 =A0 __asm __volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static void > @@ -700,7 +708,7 @@ bs_le_sm_1(bus_space_handle_t bsh, bus_s > > =A0 =A0 =A0 =A0while (cnt--) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*d =3D val; > - =A0 =A0 =A0 __asm __volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static void > @@ -710,7 +718,7 @@ bs_le_sm_2(bus_space_handle_t bsh, bus_s > > =A0 =A0 =A0 =A0while (cnt--) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0out16rb(d, val); > - =A0 =A0 =A0 __asm __volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static void > @@ -720,7 +728,7 @@ bs_le_sm_4(bus_space_handle_t bsh, bus_s > > =A0 =A0 =A0 =A0while (cnt--) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0out32rb(d, val); > - =A0 =A0 =A0 __asm __volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static void > @@ -736,7 +744,7 @@ bs_le_sr_1(bus_space_handle_t bsh, bus_s > > =A0 =A0 =A0 =A0while (cnt--) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*d++ =3D val; > - =A0 =A0 =A0 __asm __volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static void > @@ -746,7 +754,7 @@ bs_le_sr_2(bus_space_handle_t bsh, bus_s > > =A0 =A0 =A0 =A0while (cnt--) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0out16rb(d++, val); > - =A0 =A0 =A0 __asm __volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static void > @@ -756,7 +764,7 @@ bs_le_sr_4(bus_space_handle_t bsh, bus_s > > =A0 =A0 =A0 =A0while (cnt--) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0out32rb(d++, val); > - =A0 =A0 =A0 __asm __volatile("eieio; sync"); > + =A0 =A0 =A0 powerpc_iomb(); > =A0} > > =A0static void From owner-freebsd-wireless@FreeBSD.ORG Fri May 25 10:20:06 2012 Return-Path: Delivered-To: freebsd-wireless@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 794DC1065670 for ; Fri, 25 May 2012 10:20:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 6383A8FC0A for ; Fri, 25 May 2012 10:20:06 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q4PAK5mv037757 for ; Fri, 25 May 2012 10:20:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q4PAK54d037756; Fri, 25 May 2012 10:20:05 GMT (envelope-from gnats) Date: Fri, 25 May 2012 10:20:05 GMT Message-Id: <201205251020.q4PAK54d037756@freefall.freebsd.org> To: freebsd-wireless@FreeBSD.org From: Johann Hugo Cc: Subject: Re: kern/167798: ifconfig(8): problem with "ifconfig list scan" command in ad-hoc mode X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Johann Hugo 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: Fri, 25 May 2012 10:20:06 -0000 The following reply was made to PR kern/167798; it has been noted by GNATS. From: Johann Hugo To: bug-followup@freebsd.org Cc: jhugo@meraka.csir.co.za, Adrian Chadd Subject: Re: kern/167798: ifconfig(8): problem with "ifconfig list scan" command in ad-hoc mode Date: Fri, 25 May 2012 12:14:42 +0200 --Boundary-01=_Su1vPhBSl1WyPgR Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit I found a way to get it to work with the channel that was manually set and I can get it to stop stop working again. ------------------------------------------------------------------ Configure adapter (no output): ------------------------------------------------------------------ mesh-284f:~ # ifconfig wlan0 channel 13 ssid test bssid 66:98:40:46:b7:0a up mesh-284f:~ # ifconfig wlan0 list scan ------------------------------------------------------------------ Get it to work: ------------------------------------------------------------------ mesh-284f:~ # ifconfig wlan0 channel -; ifconfig wlan0 channel 13 mesh-284f:~ # ifconfig wlan0 list scan SSID/MESH ID BSSID CHAN RATE S:N INT CAPS meraka 0a:02:6f:8b:b6:93 11 54M -86:-96 100 EPS WME RSN ATH CSIR Guest 06:02:6f:8b:b6:93 11 54M -86:-96 100 ES WME ATH CSIR Wireless 00:02:6f:8b:b6:93 11 54M -87:-96 100 EPS WME RSN ATH eduroam 0e:02:6f:8b:b6:93 11 54M -87:-96 100 EPS WME RSN ATH ------------------------------------------------------------------ Get it to stop working (no output): ------------------------------------------------------------------ mesh-284f:~ # ifconfig wlan0 down; ifconfig wlan0 up mesh-284f:~ # ifconfig wlan0 list scan --Boundary-01=_Su1vPhBSl1WyPgR Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: 7bit

I found a way to get it to work with the channel that was manually set

and I can get it to stop stop working again.

 

------------------------------------------------------------------

Configure adapter (no output):

------------------------------------------------------------------

mesh-284f:~ # ifconfig wlan0 channel 13 ssid test bssid 66:98:40:46:b7:0a up

mesh-284f:~ # ifconfig wlan0 list scan

 

------------------------------------------------------------------

Get it to work:

------------------------------------------------------------------

mesh-284f:~ # ifconfig wlan0 channel -; ifconfig wlan0 channel 13

mesh-284f:~ # ifconfig wlan0 list scan

SSID/MESH ID BSSID CHAN RATE S:N INT CAPS

meraka 0a:02:6f:8b:b6:93 11 54M -86:-96 100 EPS WME RSN ATH

CSIR Guest 06:02:6f:8b:b6:93 11 54M -86:-96 100 ES WME ATH

CSIR Wireless 00:02:6f:8b:b6:93 11 54M -87:-96 100 EPS WME RSN ATH

eduroam 0e:02:6f:8b:b6:93 11 54M -87:-96 100 EPS WME RSN ATH

 

------------------------------------------------------------------

Get it to stop working (no output):

------------------------------------------------------------------

mesh-284f:~ # ifconfig wlan0 down; ifconfig wlan0 up

mesh-284f:~ # ifconfig wlan0 list scan

 

--Boundary-01=_Su1vPhBSl1WyPgR--