svn commit: r188973 - head/sys/dev/ath/ath_hal/ar5416

Sam Leffler sam at FreeBSD.org
Mon Feb 23 16:03:15 PST 2009


Author: sam
Date: Tue Feb 24 00:03:14 2009
New Revision: 188973
URL: http://svn.freebsd.org/changeset/base/188973

Log:
  move eeprom attach above first reset as the reset code checks the
  eeprom contents for 9280 and later parts

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

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c	Mon Feb 23 23:58:37 2009	(r188972)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c	Tue Feb 24 00:03:14 2009	(r188973)
@@ -244,6 +244,10 @@ ar5416Attach(uint16_t devid, HAL_SOFTC s
 		HAL_INI_VAL((struct ini *)&AH5416(ah)->ah_ini_addac, 31, 1) = 0;
 	}
 
+	ecode = ath_hal_v14EepromAttach(ah);
+	if (ecode != HAL_OK)
+		goto bad;
+
 	if (!ar5416ChipReset(ah, AH_NULL)) {	/* reset chip */
 		HALDEBUG(ah, HAL_DEBUG_ANY, "%s: chip reset failed\n",
 		    __func__);
@@ -297,10 +301,6 @@ ar5416Attach(uint16_t devid, HAL_SOFTC s
 #endif
 	}
 
-	ecode = ath_hal_v14EepromAttach(ah);
-	if (ecode != HAL_OK)
-		goto bad;
-
 	/*
 	 * Got everything we need now to setup the capabilities.
 	 */

Modified: head/sys/dev/ath/ath_hal/ar5416/ar9160_attach.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar9160_attach.c	Mon Feb 23 23:58:37 2009	(r188972)
+++ head/sys/dev/ath/ath_hal/ar5416/ar9160_attach.c	Tue Feb 24 00:03:14 2009	(r188973)
@@ -166,6 +166,10 @@ ar9160Attach(uint16_t devid, HAL_SOFTC s
 	else
 		HAL_INI_INIT(&AH5416(ah)->ah_ini_addac, ar9160Addac, 2);
 
+	ecode = ath_hal_v14EepromAttach(ah);
+	if (ecode != HAL_OK)
+		goto bad;
+
 	if (!ar5416ChipReset(ah, AH_NULL)) {	/* reset chip */
 		HALDEBUG(ah, HAL_DEBUG_ANY, "%s: chip reset failed\n", __func__);
 		ecode = HAL_EIO;
@@ -217,10 +221,6 @@ ar9160Attach(uint16_t devid, HAL_SOFTC s
 		goto bad;
 	}
 
-	ecode = ath_hal_v14EepromAttach(ah);
-	if (ecode != HAL_OK)
-		goto bad;
-
 	/*
 	 * Got everything we need now to setup the capabilities.
 	 */


More information about the svn-src-all mailing list