Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Mar 2011 00:12:26 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r219852 - in head/sys/dev/ath/ath_hal: ar9001 ar9002
Message-ID:  <201103220012.p2M0CQo2029688@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Tue Mar 22 00:12:26 2011
New Revision: 219852
URL: http://svn.freebsd.org/changeset/base/219852

Log:
  Even though it's very unlikely the misc mode register setting at -attach-
  would be a problem, make sure it isn't overwritten by whatever is in
  there at cold reset.
  
  This brings the > ar5416 init path treatment of AR_MISC_MODE.

Modified:
  head/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c
  head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c
  head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c

Modified: head/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c	Tue Mar 22 00:11:04 2011	(r219851)
+++ head/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c	Tue Mar 22 00:12:26 2011	(r219852)
@@ -247,7 +247,7 @@ ar9160Attach(uint16_t devid, HAL_SOFTC s
 	 * placed into hardware.
 	 */
 	if (ahp->ah_miscMode != 0)
-		OS_REG_WRITE(ah, AR_MISC_MODE, ahp->ah_miscMode);
+		OS_REG_WRITE(ah, AR_MISC_MODE, OS_REG_READ(ah, AR_MISC_MODE) | ahp->ah_miscMode);
 
 	ar9160AniSetup(ah);			/* Anti Noise Immunity */
 

Modified: head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c	Tue Mar 22 00:11:04 2011	(r219851)
+++ head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c	Tue Mar 22 00:12:26 2011	(r219852)
@@ -333,7 +333,7 @@ ar9280Attach(uint16_t devid, HAL_SOFTC s
 	 * placed into hardware.
 	 */
 	if (ahp->ah_miscMode != 0)
-		OS_REG_WRITE(ah, AR_MISC_MODE, ahp->ah_miscMode);
+		OS_REG_WRITE(ah, AR_MISC_MODE, OS_REG_READ(ah, AR_MISC_MODE) | ahp->ah_miscMode);
 
 	ar9280AniSetup(ah);			/* Anti Noise Immunity */
 

Modified: head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c	Tue Mar 22 00:11:04 2011	(r219851)
+++ head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c	Tue Mar 22 00:12:26 2011	(r219852)
@@ -284,7 +284,7 @@ ar9285Attach(uint16_t devid, HAL_SOFTC s
 	 * placed into hardware.
 	 */
 	if (ahp->ah_miscMode != 0)
-		OS_REG_WRITE(ah, AR_MISC_MODE, ahp->ah_miscMode);
+		OS_REG_WRITE(ah, AR_MISC_MODE, OS_REG_READ(ah, AR_MISC_MODE) | ahp->ah_miscMode);
 
 	ar9285AniSetup(ah);			/* Anti Noise Immunity */
 



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