Deleted Added
full compact
if_ath_pci.c (238433) if_ath_pci.c (238709)
1/*-
2 * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 14 unchanged lines hidden (view full) ---

23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
25 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
27 * THE POSSIBILITY OF SUCH DAMAGES.
28 */
29
30#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 14 unchanged lines hidden (view full) ---

23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
25 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
27 * THE POSSIBILITY OF SUCH DAMAGES.
28 */
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sys/dev/ath/if_ath_pci.c 238433 2012-07-14 02:22:17Z adrian $");
31__FBSDID("$FreeBSD: head/sys/dev/ath/if_ath_pci.c 238709 2012-07-23 02:49:25Z adrian $");
32
33/*
34 * PCI/Cardbus front-end for the Atheros Wireless LAN controller driver.
35 */
36#include "opt_ath.h"
37
38#include <sys/param.h>
39#include <sys/systm.h>

--- 205 unchanged lines hidden (view full) ---

245 memcpy(sc->sc_eepromdata, fw->data, fw->datasize);
246 firmware_put(fw, 0);
247 }
248#endif /* ATH_EEPROM_FIRMWARE */
249
250 ATH_LOCK_INIT(sc);
251 ATH_PCU_LOCK_INIT(sc);
252 ATH_RX_LOCK_INIT(sc);
32
33/*
34 * PCI/Cardbus front-end for the Atheros Wireless LAN controller driver.
35 */
36#include "opt_ath.h"
37
38#include <sys/param.h>
39#include <sys/systm.h>

--- 205 unchanged lines hidden (view full) ---

245 memcpy(sc->sc_eepromdata, fw->data, fw->datasize);
246 firmware_put(fw, 0);
247 }
248#endif /* ATH_EEPROM_FIRMWARE */
249
250 ATH_LOCK_INIT(sc);
251 ATH_PCU_LOCK_INIT(sc);
252 ATH_RX_LOCK_INIT(sc);
253 ATH_TXSTATUS_LOCK_INIT(sc);
253
254 error = ath_attach(pci_get_device(dev), sc);
255 if (error == 0) /* success */
256 return 0;
257
254
255 error = ath_attach(pci_get_device(dev), sc);
256 if (error == 0) /* success */
257 return 0;
258
259 ATH_TXSTATUS_LOCK_DESTROY(sc);
258 ATH_PCU_LOCK_DESTROY(sc);
259 ATH_RX_LOCK_DESTROY(sc);
260 ATH_LOCK_DESTROY(sc);
261 bus_dma_tag_destroy(sc->sc_dmat);
262bad3:
263 bus_teardown_intr(dev, psc->sc_irq, psc->sc_ih);
264bad2:
265 bus_release_resource(dev, SYS_RES_IRQ, 0, psc->sc_irq);

--- 24 unchanged lines hidden (view full) ---

290 bus_release_resource(dev, SYS_RES_IRQ, 0, psc->sc_irq);
291
292 bus_dma_tag_destroy(sc->sc_dmat);
293 bus_release_resource(dev, SYS_RES_MEMORY, BS_BAR, psc->sc_sr);
294
295 if (sc->sc_eepromdata)
296 free(sc->sc_eepromdata, M_TEMP);
297
260 ATH_PCU_LOCK_DESTROY(sc);
261 ATH_RX_LOCK_DESTROY(sc);
262 ATH_LOCK_DESTROY(sc);
263 bus_dma_tag_destroy(sc->sc_dmat);
264bad3:
265 bus_teardown_intr(dev, psc->sc_irq, psc->sc_ih);
266bad2:
267 bus_release_resource(dev, SYS_RES_IRQ, 0, psc->sc_irq);

--- 24 unchanged lines hidden (view full) ---

292 bus_release_resource(dev, SYS_RES_IRQ, 0, psc->sc_irq);
293
294 bus_dma_tag_destroy(sc->sc_dmat);
295 bus_release_resource(dev, SYS_RES_MEMORY, BS_BAR, psc->sc_sr);
296
297 if (sc->sc_eepromdata)
298 free(sc->sc_eepromdata, M_TEMP);
299
300 ATH_TXSTATUS_LOCK_DESTROY(sc);
298 ATH_PCU_LOCK_DESTROY(sc);
299 ATH_RX_LOCK_DESTROY(sc);
300 ATH_LOCK_DESTROY(sc);
301
302 return (0);
303}
304
305static int

--- 54 unchanged lines hidden ---
301 ATH_PCU_LOCK_DESTROY(sc);
302 ATH_RX_LOCK_DESTROY(sc);
303 ATH_LOCK_DESTROY(sc);
304
305 return (0);
306}
307
308static int

--- 54 unchanged lines hidden ---