From owner-cvs-src-old@FreeBSD.ORG Sat May 7 02:55:18 2011 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B75FE106577F for ; Sat, 7 May 2011 02:55:06 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 7AF0E8FC0A for ; Sat, 7 May 2011 02:55:06 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id p472t6Xv009744 for ; Sat, 7 May 2011 02:55:06 GMT (envelope-from adrian@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id p472t6bg009743 for cvs-src-old@freebsd.org; Sat, 7 May 2011 02:55:06 GMT (envelope-from adrian@repoman.freebsd.org) Message-Id: <201105070255.p472t6bg009743@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to adrian@repoman.freebsd.org using -f From: Adrian Chadd Date: Sat, 7 May 2011 02:54:52 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/dev/ath/ath_hal/ar5416 ar5416reg.h X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 02:55:18 -0000 adrian 2011-05-07 02:54:52 UTC FreeBSD src repository Modified files: sys/dev/ath/ath_hal/ar5416 ar5416reg.h Log: SVN rev 221573 on 2011-05-07 02:54:52Z by adrian Fix the OWL revision checks. A quick story, which is partially documented in the commit. The silicon revision in Linux ath9k and the Atheros HAL use an AR_SREV_REVISION mask of 0x07. FreeBSD's HAL uses the AR5212 AR_SREV_REVISION mask of 0x0F. Thus the OWL silicon revisions were coming through as 0xA, 0xB, 0xC, rather than 0x0, 0x1 and 0x2. My ath9k-sourced AR_SREV_OWL_ macros were thus using the wrong silicon revision values and wouldn't correctly match. This commit does a few things: * Change the AR_SREV_OWL_ macros to use the AR_SREV_REVISION_OWL_* values, not AR_XSREV_REVISION_OWL macros; * Disable AR_XSREV_REVISION_OWL_* values; * Modify the IS_5416 to properly check the MAC is OWL, rather than potentially matching on non-OWL revisions (which shouldn't happen unless there's a silicon revision of higher than 0x9 in a later chip..) * Add a couple more macros from the Atheros HAL for compatibility. The main difference now is that the Atheros HAL defines AR_SREV_OWL_{20,22}_OR_LATER subtly differently - it fails on all HOWL silicon. The AR_SREV_5416_*_OR_LATER macros match on the relevant OWL version -and- all HOWL versions, along with subsequent versions. A subsequent commit is going to migrate the uses of AR_SREV_OWL_X_OR_LATER to AR_SREV_5416_X_OR_LATER to match what's going on in the Atheros HAL. There's only two uses of AR_SREV_OWL_X_OR_LATER which currently don't apply to FreeBSD but it may do in the future. Yes, it's all confusing! Revision Changes Path 1.19 +31 -5 src/sys/dev/ath/ath_hal/ar5416/ar5416reg.h