From owner-svn-src-head@FreeBSD.ORG Tue Feb 24 00:03:15 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A8F5106564A; Tue, 24 Feb 2009 00:03:15 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1892D8FC27; Tue, 24 Feb 2009 00:03:15 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1O03E5r043778; Tue, 24 Feb 2009 00:03:14 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1O03ETf043776; Tue, 24 Feb 2009 00:03:14 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902240003.n1O03ETf043776@svn.freebsd.org> From: Sam Leffler Date: Tue, 24 Feb 2009 00:03:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188973 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Feb 2009 00:03:15 -0000 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. */