From owner-freebsd-bugs@FreeBSD.ORG Mon Jun 7 07:30:05 2010 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6EDA3106566C for ; Mon, 7 Jun 2010 07:30:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (unknown [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 2FB128FC14 for ; Mon, 7 Jun 2010 07:30:05 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o577U5ts099813 for ; Mon, 7 Jun 2010 07:30:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o577U51x099812; Mon, 7 Jun 2010 07:30:05 GMT (envelope-from gnats) Resent-Date: Mon, 7 Jun 2010 07:30:05 GMT Resent-Message-Id: <201006070730.o577U51x099812@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, MURAMATSU Atsushi Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D04B0106567C for ; Mon, 7 Jun 2010 07:25:06 +0000 (UTC) (envelope-from amura@tomato.sakura.ne.jp) Received: from tomato.sakura.ne.jp (tomato.sakura.ne.jp [210.188.226.72]) by mx1.freebsd.org (Postfix) with ESMTP id 80F238FC1D for ; Mon, 7 Jun 2010 07:25:06 +0000 (UTC) Received: from looxu.amura.dyndns.org (118x236x200x29.ap118.gyao.ne.jp [118.236.200.29]) (authenticated bits=0) by tomato.sakura.ne.jp (8.14.2/8.14.2/[SAKURA-WEB]/20080708) with ESMTP id o577P42e078637 for ; Mon, 7 Jun 2010 16:25:05 +0900 (JST) (envelope-from amura@tomato.sakura.ne.jp) Received: by looxu.amura.dyndns.org (Postfix, from userid 1001) id 8932A46; Mon, 7 Jun 2010 16:25:03 +0900 (JST) Message-Id: <20100607072503.8932A46@looxu.amura.dyndns.org> Date: Mon, 7 Jun 2010 16:25:03 +0900 (JST) From: MURAMATSU Atsushi To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: kern/147638: [PATCH] [ath] Atheros R9280 has probrem at 8.1-PRERELEASE X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: MURAMATSU Atsushi List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jun 2010 07:30:05 -0000 >Number: 147638 >Category: kern >Synopsis: [PATCH] [ath] Atheros R9280 has probrem at 8.1-PRERELEASE >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jun 07 07:30:04 UTC 2010 >Closed-Date: >Last-Modified: >Originator: MURAMATSU Atsushi >Release: FreeBSD 8.1-PRERELEASE i386 >Organization: >Environment: System: FreeBSD looxu.amura.dyndns.org 8.1-PRERELEASE FreeBSD 8.1-PRERELEASE #1 r208809M: Sun Jun 6 00:38:12 JST 2010 root@looxu.amura.dyndns.org:/usr/obj/usr/src/sys/LOOXU i386 >Description: I have notebook which has Atheros 9280 for Wi-fi. It worked correctly with 8-stable before 2nd March, but It doesn't work well with 8-stable at 6th June. >How-To-Repeat: >Fix: I found this probrem is caused by changing sys/dev/ath/ath_hal/ar5416reg.h at r204580. In this change, AR_SERV_MERLIN_20 macro is changed to return false with Merlin 2.1 chip. I seemed my notebook has Merlin 2.1 chip from kernel messages, so I got problem. I wrote patch for this bug, and attach it this send-pr. I think PR146517 is a same probrem, this patch can fix it. --- ath.patch begins here --- Index: ath_hal/ar5416/ar9280_attach.c =================================================================== --- ath_hal/ar5416/ar9280_attach.c (revision 208809) +++ ath_hal/ar5416/ar9280_attach.c (working copy) @@ -346,7 +346,7 @@ regWrites = ath_hal_ini_write(ah, &AH5212(ah)->ah_ini_common, 1, regWrites); - if (AR_SREV_MERLIN_20(ah) && IS_5GHZ_FAST_CLOCK_EN(ah, chan)) { + if (AR_SREV_MERLIN_2x(ah) && IS_5GHZ_FAST_CLOCK_EN(ah, chan)) { /* 5GHz channels w/ Fast Clock use different modal values */ regWrites = ath_hal_ini_write(ah, &AH9280(ah)->ah_ini_xmodes, modesIndex, regWrites); Index: ath_hal/ar5416/ar5416reg.h =================================================================== --- ath_hal/ar5416/ar5416reg.h (revision 208809) +++ ath_hal/ar5416/ar5416reg.h (working copy) @@ -601,8 +601,11 @@ #define AR_SREV_MERLIN_20(_ah) \ (AR_SREV_MERLIN(_ah) && \ AH_PRIVATE((_ah))->ah_macRev == AR_XSREV_REVISION_MERLIN_20) +#define AR_SREV_MERLIN_2x(_ah) \ + (AR_SREV_MERLIN(_ah) && \ + AH_PRIVATE((_ah))->ah_macRev >= AR_XSREV_REVISION_MERLIN_20) #define AR_SREV_MERLIN_20_OR_LATER(_ah) \ - (AR_SREV_MERLIN_20(_ah) || \ + (AR_SREV_MERLIN_2x(_ah) || \ AH_PRIVATE((_ah))->ah_macVersion > AR_XSREV_VERSION_MERLIN) #define AR_SREV_KITE(_ah) \ Index: ath_hal/ar5416/ar5416_reset.c =================================================================== --- ath_hal/ar5416/ar5416_reset.c (revision 208809) +++ ath_hal/ar5416/ar5416_reset.c (working copy) @@ -627,7 +627,7 @@ /* treat channel B as channel G , no B mode suport in owl */ rfMode = IEEE80211_IS_CHAN_CCK(chan) ? AR_PHY_MODE_DYNAMIC : AR_PHY_MODE_OFDM; - if (AR_SREV_MERLIN_20(ah) && IS_5GHZ_FAST_CLOCK_EN(ah, chan)) { + if (AR_SREV_MERLIN_2x(ah) && IS_5GHZ_FAST_CLOCK_EN(ah, chan)) { /* phy mode bits for 5GHz channels require Fast Clock */ rfMode |= AR_PHY_MODE_DYNAMIC | AR_PHY_MODE_DYN_CCK_DISABLE; @@ -1114,7 +1114,7 @@ { uint32_t pll; - if (AR_SREV_MERLIN_20(ah) && + if (AR_SREV_MERLIN_2x(ah) && chan != AH_NULL && IEEE80211_IS_CHAN_5GHZ(chan)) { /* * PLL WAR for Merlin 2.0/2.1 --- ath.patch ends here --- --- dmesg begins here --- Copyright (c) 1992-2010 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 8.1-PRERELEASE #1 r208809M: Sun Jun 6 00:38:12 JST 2010 root@looxu.amura.dyndns.org:/usr/obj/usr/src/sys/LOOXU i386 Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel(R) Atom(TM) CPU Z530 @ 1.60GHz (1596.01-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x106c2 Family = 6 Model = 1c Stepping = 2 Features=0xbfe9fbff Features2=0x40c3bd AMD Features=0x100000 AMD Features2=0x1 TSC: P-state invariant real memory = 1073741824 (1024 MB) avail memory = 1025736704 (978 MB) -- snip -- ath0: mem 0xfd500000-0xfd50ffff irq 17 at device 0.0 on pci8 ath0: [ITHREAD] ath0: AR9280 mac 128.2 RF5133 phy 13.0 -- snip -- --- dmesg ends here --- >Release-Note: >Audit-Trail: >Unformatted: