if_vr.c (112872) | if_vr.c (112880) |
---|---|
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 --- 15 unchanged lines hidden (view full) --- 24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 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 * | 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 --- 15 unchanged lines hidden (view full) --- 24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 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 * $FreeBSD: head/sys/dev/vr/if_vr.c 112872 2003-03-31 17:29:43Z njl $ | 32 * $FreeBSD: head/sys/dev/vr/if_vr.c 112880 2003-03-31 20:22:00Z jhb $ |
33 */ 34 35/* 36 * VIA Rhine fast ethernet PCI NIC driver 37 * 38 * Supports various network adapters based on the VIA Rhine 39 * and Rhine II PCI controllers, including the D-Link DFE530TX. 40 * Datasheets are available at http://www.via.com.tw. --- 55 unchanged lines hidden (view full) --- 96 97MODULE_DEPEND(vr, miibus, 1, 1, 1); 98 99/* "controller miibus0" required. See GENERIC if you get errors here. */ 100#include "miibus_if.h" 101 102#ifndef lint 103static const char rcsid[] = | 33 */ 34 35/* 36 * VIA Rhine fast ethernet PCI NIC driver 37 * 38 * Supports various network adapters based on the VIA Rhine 39 * and Rhine II PCI controllers, including the D-Link DFE530TX. 40 * Datasheets are available at http://www.via.com.tw. --- 55 unchanged lines hidden (view full) --- 96 97MODULE_DEPEND(vr, miibus, 1, 1, 1); 98 99/* "controller miibus0" required. See GENERIC if you get errors here. */ 100#include "miibus_if.h" 101 102#ifndef lint 103static const char rcsid[] = |
104 "$FreeBSD: head/sys/dev/vr/if_vr.c 112872 2003-03-31 17:29:43Z njl $"; | 104 "$FreeBSD: head/sys/dev/vr/if_vr.c 112880 2003-03-31 20:22:00Z jhb $"; |
105#endif 106 107#undef VR_USESWSHIFT 108 109/* 110 * Various supported device vendors/types and their names. 111 */ 112static struct vr_type vr_devs[] = { --- 803 unchanged lines hidden (view full) --- 916static int 917vr_detach(dev) 918 device_t dev; 919{ 920 struct vr_softc *sc; 921 struct ifnet *ifp; 922 923 sc = device_get_softc(dev); | 105#endif 106 107#undef VR_USESWSHIFT 108 109/* 110 * Various supported device vendors/types and their names. 111 */ 112static struct vr_type vr_devs[] = { --- 803 unchanged lines hidden (view full) --- 916static int 917vr_detach(dev) 918 device_t dev; 919{ 920 struct vr_softc *sc; 921 struct ifnet *ifp; 922 923 sc = device_get_softc(dev); |
924 KASSERT(mtx_initialized(&sc->vr_mtx), "vr mutex not initialized"); | 924 KASSERT(mtx_initialized(&sc->vr_mtx), ("vr mutex not initialized")); |
925 VR_LOCK(sc); 926 ifp = &sc->arpcom.ac_if; 927 928 if (device_is_alive(dev)) { 929 if (bus_child_present(dev)) 930 vr_stop(sc); 931 ether_ifdetach(ifp); 932 device_delete_child(dev, sc->vr_miibus); --- 884 unchanged lines hidden --- | 925 VR_LOCK(sc); 926 ifp = &sc->arpcom.ac_if; 927 928 if (device_is_alive(dev)) { 929 if (bus_child_present(dev)) 930 vr_stop(sc); 931 ether_ifdetach(ifp); 932 device_delete_child(dev, sc->vr_miibus); --- 884 unchanged lines hidden --- |