Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 May 2011 13:24:17 +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: r221777 - head/sys/dev/ath/ath_hal/ar5416
Message-ID:  <201105111324.p4BDOHd0091713@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Wed May 11 13:24:17 2011
New Revision: 221777
URL: http://svn.freebsd.org/changeset/base/221777

Log:
  Make sure the chip is awake before writing to it to finally detach
  it.
  
  Obtained from:	Atheros

Modified:
  head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c	Wed May 11 13:22:41 2011	(r221776)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c	Wed May 11 13:24:17 2011	(r221777)
@@ -420,6 +420,12 @@ ar5416Detach(struct ath_hal *ah)
 	HALASSERT(ah != AH_NULL);
 	HALASSERT(ah->ah_magic == AR5416_MAGIC);
 
+	/* Make sure that chip is awake before writing to it */
+	if (! ar5416SetPowerMode(ah, HAL_PM_AWAKE, AH_TRUE))
+		HALDEBUG(ah, HAL_DEBUG_UNMASKABLE,
+		    "%s: failed to wake up chip\n",
+		    __func__);
+
 	ar5416AniDetach(ah);
 	ar5212RfDetach(ah);
 	ah->ah_disable(ah);



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