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);
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to