if_nge.c (150185) | if_nge.c (150306) |
---|---|
1/*- 2 * Copyright (c) 2001 Wind River Systems 3 * Copyright (c) 1997, 1998, 1999, 2000, 2001 4 * Bill Paul <wpaul@bsdi.com>. 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: --- 18 unchanged lines hidden (view full) --- 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31 * THE POSSIBILITY OF SUCH DAMAGE. 32 */ 33 34#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2001 Wind River Systems 3 * Copyright (c) 1997, 1998, 1999, 2000, 2001 4 * Bill Paul <wpaul@bsdi.com>. 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: --- 18 unchanged lines hidden (view full) --- 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31 * THE POSSIBILITY OF SUCH DAMAGE. 32 */ 33 34#include <sys/cdefs.h> |
35__FBSDID("$FreeBSD: head/sys/dev/nge/if_nge.c 150185 2005-09-15 20:06:44Z ru $"); | 35__FBSDID("$FreeBSD: head/sys/dev/nge/if_nge.c 150306 2005-09-19 03:10:21Z imp $"); |
36 37/* 38 * National Semiconductor DP83820/DP83821 gigabit ethernet driver 39 * for FreeBSD. Datasheets are available from: 40 * 41 * http://www.national.com/ds/DP/DP83820.pdf 42 * http://www.national.com/ds/DP/DP83821.pdf 43 * --- 914 unchanged lines hidden (view full) --- 958 sc = device_get_softc(dev); 959 ifp = sc->nge_ifp; 960 961 NGE_LOCK(sc); 962 nge_reset(sc); 963 nge_stop(sc); 964 NGE_UNLOCK(sc); 965 ether_ifdetach(ifp); | 36 37/* 38 * National Semiconductor DP83820/DP83821 gigabit ethernet driver 39 * for FreeBSD. Datasheets are available from: 40 * 41 * http://www.national.com/ds/DP/DP83820.pdf 42 * http://www.national.com/ds/DP/DP83821.pdf 43 * --- 914 unchanged lines hidden (view full) --- 958 sc = device_get_softc(dev); 959 ifp = sc->nge_ifp; 960 961 NGE_LOCK(sc); 962 nge_reset(sc); 963 nge_stop(sc); 964 NGE_UNLOCK(sc); 965 ether_ifdetach(ifp); |
966 if_free(ifp); | |
967 968 bus_generic_detach(dev); 969 if (!sc->nge_tbi) { 970 device_delete_child(dev, sc->nge_miibus); 971 } 972 bus_teardown_intr(dev, sc->nge_irq, sc->nge_intrhand); 973 bus_release_resource(dev, SYS_RES_IRQ, 0, sc->nge_irq); 974 bus_release_resource(dev, NGE_RES, NGE_RID, sc->nge_res); 975 976 contigfree(sc->nge_ldata, sizeof(struct nge_list_data), M_DEVBUF); | 966 967 bus_generic_detach(dev); 968 if (!sc->nge_tbi) { 969 device_delete_child(dev, sc->nge_miibus); 970 } 971 bus_teardown_intr(dev, sc->nge_irq, sc->nge_intrhand); 972 bus_release_resource(dev, SYS_RES_IRQ, 0, sc->nge_irq); 973 bus_release_resource(dev, NGE_RES, NGE_RID, sc->nge_res); 974 975 contigfree(sc->nge_ldata, sizeof(struct nge_list_data), M_DEVBUF); |
976 if_free(ifp); |
|
977 978 NGE_LOCK_DESTROY(sc); 979 980 return(0); 981} 982 983/* 984 * Initialize the transmit descriptors. --- 1187 unchanged lines hidden --- | 977 978 NGE_LOCK_DESTROY(sc); 979 980 return(0); 981} 982 983/* 984 * Initialize the transmit descriptors. --- 1187 unchanged lines hidden --- |