1/*- 2 * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting 3 * Copyright (c) 2010-2011 Adrian Chadd, Xenion Pty Ltd 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 15 unchanged lines hidden (view full) --- 24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 26 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 28 * THE POSSIBILITY OF SUCH DAMAGES. 29 */ 30 31#include <sys/cdefs.h> |
32__FBSDID("$FreeBSD: head/sys/dev/ath/if_ath_ahb.c 238709 2012-07-23 02:49:25Z adrian $"); |
33 34/* 35 * AHB bus front-end for the Atheros Wireless LAN controller driver. 36 */ 37 38#include "opt_ath.h" 39 40#include <sys/param.h> --- 148 unchanged lines hidden (view full) --- 189 &sc->sc_dmat)) { 190 device_printf(dev, "cannot allocate DMA tag\n"); 191 goto bad3; 192 } 193 194 ATH_LOCK_INIT(sc); 195 ATH_PCU_LOCK_INIT(sc); 196 ATH_RX_LOCK_INIT(sc); |
197 ATH_TXSTATUS_LOCK_INIT(sc); |
198 199 error = ath_attach(AR9130_DEVID, sc); 200 if (error == 0) /* success */ 201 return 0; 202 |
203 ATH_TXSTATUS_LOCK_DESTROY(sc); |
204 ATH_RX_LOCK_DESTROY(sc); 205 ATH_PCU_LOCK_DESTROY(sc); 206 ATH_LOCK_DESTROY(sc); 207 bus_dma_tag_destroy(sc->sc_dmat); 208bad3: 209 bus_teardown_intr(dev, psc->sc_irq, psc->sc_ih); 210bad2: 211 bus_release_resource(dev, SYS_RES_IRQ, 0, psc->sc_irq); --- 25 unchanged lines hidden (view full) --- 237 238 bus_dma_tag_destroy(sc->sc_dmat); 239 bus_release_resource(dev, SYS_RES_MEMORY, 0, psc->sc_sr); 240 bus_release_resource(dev, SYS_RES_MEMORY, 0, psc->sc_eeprom); 241 /* XXX?! */ 242 if (sc->sc_eepromdata) 243 free(sc->sc_eepromdata, M_TEMP); 244 |
245 ATH_TXSTATUS_LOCK_DESTROY(sc); |
246 ATH_RX_LOCK_DESTROY(sc); 247 ATH_PCU_LOCK_DESTROY(sc); 248 ATH_LOCK_DESTROY(sc); 249 250 return (0); 251} 252 253static int --- 49 unchanged lines hidden --- |