Deleted Added
full compact
if_sis.c (113609) if_sis.c (113812)
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 113609 2003-04-17 20:32:06Z njl $
32 * $FreeBSD: head/sys/pci/if_sis.c 113812 2003-04-21 18:34:04Z imp $
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.

--- 12 unchanged lines hidden (view full) ---

53 * Both chips offer the standard bit-bang MII interface as well as
54 * an enchanced PHY interface which simplifies accessing MII registers.
55 *
56 * The only downside to this chipset is that RX descriptors must be
57 * longword aligned.
58 */
59
60#include <sys/cdefs.h>
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.

--- 12 unchanged lines hidden (view full) ---

53 * Both chips offer the standard bit-bang MII interface as well as
54 * an enchanced PHY interface which simplifies accessing MII registers.
55 *
56 * The only downside to this chipset is that RX descriptors must be
57 * longword aligned.
58 */
59
60#include <sys/cdefs.h>
61__FBSDID("$FreeBSD: head/sys/pci/if_sis.c 113609 2003-04-17 20:32:06Z njl $");
61__FBSDID("$FreeBSD: head/sys/pci/if_sis.c 113812 2003-04-21 18:34:04Z imp $");
62
63#include <sys/param.h>
64#include <sys/systm.h>
65#include <sys/sockio.h>
66#include <sys/mbuf.h>
67#include <sys/malloc.h>
68#include <sys/kernel.h>
69#include <sys/socket.h>

--- 1349 unchanged lines hidden (view full) ---

1419 struct ifnet *ifp;
1420
1421 sc = device_get_softc(dev);
1422 KASSERT(mtx_initialized(&sc->sis_mtx), ("sis mutex not initialized"));
1423 SIS_LOCK(sc);
1424 ifp = &sc->arpcom.ac_if;
1425
1426 /* These should only be active if attach succeeded */
62
63#include <sys/param.h>
64#include <sys/systm.h>
65#include <sys/sockio.h>
66#include <sys/mbuf.h>
67#include <sys/malloc.h>
68#include <sys/kernel.h>
69#include <sys/socket.h>

--- 1349 unchanged lines hidden (view full) ---

1419 struct ifnet *ifp;
1420
1421 sc = device_get_softc(dev);
1422 KASSERT(mtx_initialized(&sc->sis_mtx), ("sis mutex not initialized"));
1423 SIS_LOCK(sc);
1424 ifp = &sc->arpcom.ac_if;
1425
1426 /* These should only be active if attach succeeded */
1427 if (device_is_alive(dev)) {
1427 if (device_is_attached(dev)) {
1428 sis_reset(sc);
1429 sis_stop(sc);
1430 ether_ifdetach(ifp);
1431 }
1432 if (sc->sis_miibus)
1433 device_delete_child(dev, sc->sis_miibus);
1434 bus_generic_detach(dev);
1435

--- 962 unchanged lines hidden ---
1428 sis_reset(sc);
1429 sis_stop(sc);
1430 ether_ifdetach(ifp);
1431 }
1432 if (sc->sis_miibus)
1433 device_delete_child(dev, sc->sis_miibus);
1434 bus_generic_detach(dev);
1435

--- 962 unchanged lines hidden ---