Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 May 2011 02:54:52 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/sys/dev/ath/ath_hal/ar5416 ar5416reg.h
Message-ID:  <201105070255.p472t6bg009743@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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_<X> 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_<x> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105070255.p472t6bg009743>