if_vr.c (150968) | if_vr.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/dev/vr/if_vr.c 150968 2005-10-05 10:09:17Z glebius $"); | 34__FBSDID("$FreeBSD: head/sys/dev/vr/if_vr.c 151297 2005-10-13 21:11:20Z ru $"); |
35 36/* 37 * VIA Rhine fast ethernet PCI NIC driver 38 * 39 * Supports various network adapters based on the VIA Rhine 40 * and Rhine II PCI controllers, including the D-Link DFE530TX. 41 * Datasheets are available at http://www.via.com.tw. 42 * --- 766 unchanged lines hidden (view full) --- 809 810 /* These should only be active if attach succeeded */ 811 if (device_is_attached(dev)) { 812 vr_stop(sc); 813 VR_UNLOCK(sc); /* XXX: Avoid recursive acquire. */ 814 ether_ifdetach(ifp); 815 VR_LOCK(sc); 816 } | 35 36/* 37 * VIA Rhine fast ethernet PCI NIC driver 38 * 39 * Supports various network adapters based on the VIA Rhine 40 * and Rhine II PCI controllers, including the D-Link DFE530TX. 41 * Datasheets are available at http://www.via.com.tw. 42 * --- 766 unchanged lines hidden (view full) --- 809 810 /* These should only be active if attach succeeded */ 811 if (device_is_attached(dev)) { 812 vr_stop(sc); 813 VR_UNLOCK(sc); /* XXX: Avoid recursive acquire. */ 814 ether_ifdetach(ifp); 815 VR_LOCK(sc); 816 } |
817 if (ifp) 818 if_free(ifp); | |
819 if (sc->vr_miibus) 820 device_delete_child(dev, sc->vr_miibus); 821 bus_generic_detach(dev); 822 823 if (sc->vr_intrhand) 824 bus_teardown_intr(dev, sc->vr_irq, sc->vr_intrhand); 825 if (sc->vr_irq) 826 bus_release_resource(dev, SYS_RES_IRQ, 0, sc->vr_irq); 827 if (sc->vr_res) 828 bus_release_resource(dev, VR_RES, VR_RID, sc->vr_res); 829 | 817 if (sc->vr_miibus) 818 device_delete_child(dev, sc->vr_miibus); 819 bus_generic_detach(dev); 820 821 if (sc->vr_intrhand) 822 bus_teardown_intr(dev, sc->vr_irq, sc->vr_intrhand); 823 if (sc->vr_irq) 824 bus_release_resource(dev, SYS_RES_IRQ, 0, sc->vr_irq); 825 if (sc->vr_res) 826 bus_release_resource(dev, VR_RES, VR_RID, sc->vr_res); 827 |
828 if (ifp) 829 if_free(ifp); 830 |
|
830 if (sc->vr_ldata) 831 contigfree(sc->vr_ldata, sizeof(struct vr_list_data), M_DEVBUF); 832 833 VR_UNLOCK(sc); 834 mtx_destroy(&sc->vr_mtx); 835 836 return (0); 837} --- 884 unchanged lines hidden --- | 831 if (sc->vr_ldata) 832 contigfree(sc->vr_ldata, sizeof(struct vr_list_data), M_DEVBUF); 833 834 VR_UNLOCK(sc); 835 mtx_destroy(&sc->vr_mtx); 836 837 return (0); 838} --- 884 unchanged lines hidden --- |