Deleted Added
full compact
if_dc.c (112872) if_dc.c (112880)
1/*
2 * Copyright (c) 1997, 1998, 1999
3 * Bill Paul <wpaul@ee.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@ee.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/dc/if_dc.c 112872 2003-03-31 17:29:43Z njl $
32 * $FreeBSD: head/sys/dev/dc/if_dc.c 112880 2003-03-31 20:22:00Z jhb $
33 */
34
35/*
36 * DEC "tulip" clone ethernet driver. Supports the DEC/Intel 21143
37 * series chips and several workalikes including the following:
38 *
39 * Macronix 98713/98715/98725/98727/98732 PMAC (www.macronix.com)
40 * Macronix/Lite-On 82c115 PNIC II (www.macronix.com)

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

132
133MODULE_DEPEND(dc, miibus, 1, 1, 1);
134
135/* "controller miibus0" required. See GENERIC if you get errors here. */
136#include "miibus_if.h"
137
138#ifndef lint
139static const char rcsid[] =
33 */
34
35/*
36 * DEC "tulip" clone ethernet driver. Supports the DEC/Intel 21143
37 * series chips and several workalikes including the following:
38 *
39 * Macronix 98713/98715/98725/98727/98732 PMAC (www.macronix.com)
40 * Macronix/Lite-On 82c115 PNIC II (www.macronix.com)

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

132
133MODULE_DEPEND(dc, miibus, 1, 1, 1);
134
135/* "controller miibus0" required. See GENERIC if you get errors here. */
136#include "miibus_if.h"
137
138#ifndef lint
139static const char rcsid[] =
140 "$FreeBSD: head/sys/dev/dc/if_dc.c 112872 2003-03-31 17:29:43Z njl $";
140 "$FreeBSD: head/sys/dev/dc/if_dc.c 112880 2003-03-31 20:22:00Z jhb $";
141#endif
142
143/*
144 * Various supported device vendors/types and their names.
145 */
146static struct dc_type dc_devs[] = {
147 { DC_VENDORID_DEC, DC_DEVICEID_21143,
148 "Intel 21143 10/100BaseTX" },

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

2314dc_detach(dev)
2315 device_t dev;
2316{
2317 struct dc_softc *sc;
2318 struct ifnet *ifp;
2319 struct dc_mediainfo *m;
2320
2321 sc = device_get_softc(dev);
141#endif
142
143/*
144 * Various supported device vendors/types and their names.
145 */
146static struct dc_type dc_devs[] = {
147 { DC_VENDORID_DEC, DC_DEVICEID_21143,
148 "Intel 21143 10/100BaseTX" },

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

2314dc_detach(dev)
2315 device_t dev;
2316{
2317 struct dc_softc *sc;
2318 struct ifnet *ifp;
2319 struct dc_mediainfo *m;
2320
2321 sc = device_get_softc(dev);
2322 KASSERT(mtx_initialized(&sc->dc_mtx), "dc mutex not initialized");
2322 KASSERT(mtx_initialized(&sc->dc_mtx), ("dc mutex not initialized"));
2323 DC_LOCK(sc);
2324
2325 ifp = &sc->arpcom.ac_if;
2326
2327 if (device_is_alive(dev)) {
2328 if (bus_child_present(dev))
2329 dc_stop(sc);
2330 ether_ifdetach(ifp);

--- 1436 unchanged lines hidden ---
2323 DC_LOCK(sc);
2324
2325 ifp = &sc->arpcom.ac_if;
2326
2327 if (device_is_alive(dev)) {
2328 if (bus_child_present(dev))
2329 dc_stop(sc);
2330 ether_ifdetach(ifp);

--- 1436 unchanged lines hidden ---