if_ste.c (112872) | if_ste.c (112880) |
---|---|
1/* 2 * Copyright (c) 1997, 1998, 1999 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, 1999 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/pci/if_ste.c 112872 2003-03-31 17:29:43Z njl $ | 32 * $FreeBSD: head/sys/pci/if_ste.c 112880 2003-03-31 20:22:00Z jhb $ |
33 */ 34 35#include <sys/param.h> 36#include <sys/systm.h> 37#include <sys/sockio.h> 38#include <sys/mbuf.h> 39#include <sys/malloc.h> 40#include <sys/kernel.h> --- 29 unchanged lines hidden (view full) --- 70#define STE_USEIOSPACE 71 72#include <pci/if_stereg.h> 73 74MODULE_DEPEND(ste, miibus, 1, 1, 1); 75 76#if !defined(lint) 77static const char rcsid[] = | 33 */ 34 35#include <sys/param.h> 36#include <sys/systm.h> 37#include <sys/sockio.h> 38#include <sys/mbuf.h> 39#include <sys/malloc.h> 40#include <sys/kernel.h> --- 29 unchanged lines hidden (view full) --- 70#define STE_USEIOSPACE 71 72#include <pci/if_stereg.h> 73 74MODULE_DEPEND(ste, miibus, 1, 1, 1); 75 76#if !defined(lint) 77static const char rcsid[] = |
78 "$FreeBSD: head/sys/pci/if_ste.c 112872 2003-03-31 17:29:43Z njl $"; | 78 "$FreeBSD: head/sys/pci/if_ste.c 112880 2003-03-31 20:22:00Z jhb $"; |
79#endif 80 81/* 82 * Various supported device vendors/types and their names. 83 */ 84static struct ste_type ste_devs[] = { 85 { ST_VENDORID, ST_DEVICEID_ST201, "Sundance ST201 10/100BaseTX" }, 86 { DL_VENDORID, DL_DEVICEID_DL10050, "D-Link DL10050 10/100BaseTX" }, --- 1003 unchanged lines hidden (view full) --- 1090static int 1091ste_detach(dev) 1092 device_t dev; 1093{ 1094 struct ste_softc *sc; 1095 struct ifnet *ifp; 1096 1097 sc = device_get_softc(dev); | 79#endif 80 81/* 82 * Various supported device vendors/types and their names. 83 */ 84static struct ste_type ste_devs[] = { 85 { ST_VENDORID, ST_DEVICEID_ST201, "Sundance ST201 10/100BaseTX" }, 86 { DL_VENDORID, DL_DEVICEID_DL10050, "D-Link DL10050 10/100BaseTX" }, --- 1003 unchanged lines hidden (view full) --- 1090static int 1091ste_detach(dev) 1092 device_t dev; 1093{ 1094 struct ste_softc *sc; 1095 struct ifnet *ifp; 1096 1097 sc = device_get_softc(dev); |
1098 KASSERT(mtx_initialized(&sc->ste_mtx), "ste mutex not initialized"); | 1098 KASSERT(mtx_initialized(&sc->ste_mtx), ("ste mutex not initialized")); |
1099 STE_LOCK(sc); 1100 ifp = &sc->arpcom.ac_if; 1101 1102 if (device_is_alive(dev)) { 1103 if (bus_child_present(dev)) 1104 ste_stop(sc); 1105 ether_ifdetach(ifp); 1106 device_delete_child(dev, sc->ste_miibus); --- 554 unchanged lines hidden --- | 1099 STE_LOCK(sc); 1100 ifp = &sc->arpcom.ac_if; 1101 1102 if (device_is_alive(dev)) { 1103 if (bus_child_present(dev)) 1104 ste_stop(sc); 1105 ether_ifdetach(ifp); 1106 device_delete_child(dev, sc->ste_miibus); --- 554 unchanged lines hidden --- |