if_tl.c (150213) | if_tl.c (151297) |
---|---|
1/*- 2 * Copyright (c) 1997, 1998 3 * Bill Paul <wpaul@ctr.columbia.edu>. 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 --- 17 unchanged lines hidden (view full) --- 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30 * THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1997, 1998 3 * Bill Paul <wpaul@ctr.columbia.edu>. 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 --- 17 unchanged lines hidden (view full) --- 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30 * THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33#include <sys/cdefs.h> |
34__FBSDID("$FreeBSD: head/sys/pci/if_tl.c 150213 2005-09-16 11:11:51Z ru $"); | 34__FBSDID("$FreeBSD: head/sys/pci/if_tl.c 151297 2005-10-13 21:11:20Z ru $"); |
35 36/* 37 * Texas Instruments ThunderLAN driver for FreeBSD 2.2.6 and 3.x. 38 * Supports many Compaq PCI NICs based on the ThunderLAN ethernet controller, 39 * the National Semiconductor DP83840A physical interface and the 40 * Microchip Technology 24Cxx series serial EEPROM. 41 * 42 * Written using the following four documents: --- 1295 unchanged lines hidden (view full) --- 1338 /* These should only be active if attach succeeded */ 1339 if (device_is_attached(dev)) { 1340 TL_LOCK(sc); 1341 tl_stop(sc); 1342 TL_UNLOCK(sc); 1343 callout_drain(&sc->tl_stat_callout); 1344 ether_ifdetach(ifp); 1345 } | 35 36/* 37 * Texas Instruments ThunderLAN driver for FreeBSD 2.2.6 and 3.x. 38 * Supports many Compaq PCI NICs based on the ThunderLAN ethernet controller, 39 * the National Semiconductor DP83840A physical interface and the 40 * Microchip Technology 24Cxx series serial EEPROM. 41 * 42 * Written using the following four documents: --- 1295 unchanged lines hidden (view full) --- 1338 /* These should only be active if attach succeeded */ 1339 if (device_is_attached(dev)) { 1340 TL_LOCK(sc); 1341 tl_stop(sc); 1342 TL_UNLOCK(sc); 1343 callout_drain(&sc->tl_stat_callout); 1344 ether_ifdetach(ifp); 1345 } |
1346 if (ifp) 1347 if_free(ifp); | |
1348 if (sc->tl_miibus) 1349 device_delete_child(dev, sc->tl_miibus); 1350 bus_generic_detach(dev); 1351 1352 if (sc->tl_ldata) 1353 contigfree(sc->tl_ldata, sizeof(struct tl_list_data), M_DEVBUF); 1354 if (sc->tl_bitrate) 1355 ifmedia_removeall(&sc->ifmedia); 1356 1357 if (sc->tl_intrhand) 1358 bus_teardown_intr(dev, sc->tl_irq, sc->tl_intrhand); 1359 if (sc->tl_irq) 1360 bus_release_resource(dev, SYS_RES_IRQ, 0, sc->tl_irq); 1361 if (sc->tl_res) 1362 bus_release_resource(dev, TL_RES, TL_RID, sc->tl_res); 1363 | 1346 if (sc->tl_miibus) 1347 device_delete_child(dev, sc->tl_miibus); 1348 bus_generic_detach(dev); 1349 1350 if (sc->tl_ldata) 1351 contigfree(sc->tl_ldata, sizeof(struct tl_list_data), M_DEVBUF); 1352 if (sc->tl_bitrate) 1353 ifmedia_removeall(&sc->ifmedia); 1354 1355 if (sc->tl_intrhand) 1356 bus_teardown_intr(dev, sc->tl_irq, sc->tl_intrhand); 1357 if (sc->tl_irq) 1358 bus_release_resource(dev, SYS_RES_IRQ, 0, sc->tl_irq); 1359 if (sc->tl_res) 1360 bus_release_resource(dev, TL_RES, TL_RID, sc->tl_res); 1361 |
1362 if (ifp) 1363 if_free(ifp); 1364 |
|
1364 mtx_destroy(&sc->tl_mtx); 1365 1366 return(0); 1367} 1368 1369/* 1370 * Initialize the transmit lists. 1371 */ --- 992 unchanged lines hidden --- | 1365 mtx_destroy(&sc->tl_mtx); 1366 1367 return(0); 1368} 1369 1370/* 1371 * Initialize the transmit lists. 1372 */ --- 992 unchanged lines hidden --- |