if_sis.c (112872) | if_sis.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_sis.c 112872 2003-03-31 17:29:43Z njl $ | 32 * $FreeBSD: head/sys/pci/if_sis.c 112880 2003-03-31 20:22:00Z jhb $ |
33 */ 34 35/* 36 * SiS 900/SiS 7016 fast ethernet PCI NIC driver. Datasheets are 37 * available from http://www.sis.com.tw. 38 * 39 * This driver also supports the NatSemi DP83815. Datasheets are 40 * available from http://www.national.com. --- 54 unchanged lines hidden (view full) --- 95 96MODULE_DEPEND(sis, miibus, 1, 1, 1); 97 98/* "controller miibus0" required. See GENERIC if you get errors here. */ 99#include "miibus_if.h" 100 101#ifndef lint 102static const char rcsid[] = | 33 */ 34 35/* 36 * SiS 900/SiS 7016 fast ethernet PCI NIC driver. Datasheets are 37 * available from http://www.sis.com.tw. 38 * 39 * This driver also supports the NatSemi DP83815. Datasheets are 40 * available from http://www.national.com. --- 54 unchanged lines hidden (view full) --- 95 96MODULE_DEPEND(sis, miibus, 1, 1, 1); 97 98/* "controller miibus0" required. See GENERIC if you get errors here. */ 99#include "miibus_if.h" 100 101#ifndef lint 102static const char rcsid[] = |
103 "$FreeBSD: head/sys/pci/if_sis.c 112872 2003-03-31 17:29:43Z njl $"; | 103 "$FreeBSD: head/sys/pci/if_sis.c 112880 2003-03-31 20:22:00Z jhb $"; |
104#endif 105 106/* 107 * Various supported device vendors/types and their names. 108 */ 109static struct sis_type sis_devs[] = { 110 { SIS_VENDORID, SIS_DEVICEID_900, "SiS 900 10/100BaseTX" }, 111 { SIS_VENDORID, SIS_DEVICEID_7016, "SiS 7016 10/100BaseTX" }, --- 1311 unchanged lines hidden (view full) --- 1423static int 1424sis_detach(dev) 1425 device_t dev; 1426{ 1427 struct sis_softc *sc; 1428 struct ifnet *ifp; 1429 1430 sc = device_get_softc(dev); | 104#endif 105 106/* 107 * Various supported device vendors/types and their names. 108 */ 109static struct sis_type sis_devs[] = { 110 { SIS_VENDORID, SIS_DEVICEID_900, "SiS 900 10/100BaseTX" }, 111 { SIS_VENDORID, SIS_DEVICEID_7016, "SiS 7016 10/100BaseTX" }, --- 1311 unchanged lines hidden (view full) --- 1423static int 1424sis_detach(dev) 1425 device_t dev; 1426{ 1427 struct sis_softc *sc; 1428 struct ifnet *ifp; 1429 1430 sc = device_get_softc(dev); |
1431 KASSERT(mtx_initialized(&sc->sis_mtx), "sis mutex not initialized"); | 1431 KASSERT(mtx_initialized(&sc->sis_mtx), ("sis mutex not initialized")); |
1432 SIS_LOCK(sc); 1433 ifp = &sc->arpcom.ac_if; 1434 1435 if (device_is_alive(dev)) { 1436 if (bus_child_present(dev)) { 1437 sis_reset(sc); 1438 sis_stop(sc); 1439 } --- 967 unchanged lines hidden --- | 1432 SIS_LOCK(sc); 1433 ifp = &sc->arpcom.ac_if; 1434 1435 if (device_is_alive(dev)) { 1436 if (bus_child_present(dev)) { 1437 sis_reset(sc); 1438 sis_stop(sc); 1439 } --- 967 unchanged lines hidden --- |