if_dc.c (113669) | if_dc.c (113812) |
---|---|
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 --- 74 unchanged lines hidden (view full) --- 83 * All of the workalike chips use some form of MII transceiver support 84 * with the exception of the Macronix chips, which also have a SYM port. 85 * The ASIX AX88140A is also documented to have a SYM port, but all 86 * the cards I've seen use an MII transceiver, probably because the 87 * AX88140A doesn't support internal NWAY. 88 */ 89 90#include <sys/cdefs.h> | 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 --- 74 unchanged lines hidden (view full) --- 83 * All of the workalike chips use some form of MII transceiver support 84 * with the exception of the Macronix chips, which also have a SYM port. 85 * The ASIX AX88140A is also documented to have a SYM port, but all 86 * the cards I've seen use an MII transceiver, probably because the 87 * AX88140A doesn't support internal NWAY. 88 */ 89 90#include <sys/cdefs.h> |
91__FBSDID("$FreeBSD: head/sys/dev/dc/if_dc.c 113669 2003-04-18 15:42:25Z sanpei $"); | 91__FBSDID("$FreeBSD: head/sys/dev/dc/if_dc.c 113812 2003-04-21 18:34:04Z imp $"); |
92 93#include <sys/param.h> 94#include <sys/systm.h> 95#include <sys/sockio.h> 96#include <sys/mbuf.h> 97#include <sys/malloc.h> 98#include <sys/kernel.h> 99#include <sys/socket.h> --- 2211 unchanged lines hidden (view full) --- 2311 2312 sc = device_get_softc(dev); 2313 KASSERT(mtx_initialized(&sc->dc_mtx), ("dc mutex not initialized")); 2314 DC_LOCK(sc); 2315 2316 ifp = &sc->arpcom.ac_if; 2317 2318 /* These should only be active if attach succeeded */ | 92 93#include <sys/param.h> 94#include <sys/systm.h> 95#include <sys/sockio.h> 96#include <sys/mbuf.h> 97#include <sys/malloc.h> 98#include <sys/kernel.h> 99#include <sys/socket.h> --- 2211 unchanged lines hidden (view full) --- 2311 2312 sc = device_get_softc(dev); 2313 KASSERT(mtx_initialized(&sc->dc_mtx), ("dc mutex not initialized")); 2314 DC_LOCK(sc); 2315 2316 ifp = &sc->arpcom.ac_if; 2317 2318 /* These should only be active if attach succeeded */ |
2319 if (device_is_alive(dev)) { | 2319 if (device_is_attached(dev)) { |
2320 dc_stop(sc); 2321 ether_ifdetach(ifp); 2322 } 2323 if (sc->dc_miibus) 2324 device_delete_child(dev, sc->dc_miibus); 2325 bus_generic_detach(dev); 2326 2327 if (sc->dc_intrhand) --- 1431 unchanged lines hidden --- | 2320 dc_stop(sc); 2321 ether_ifdetach(ifp); 2322 } 2323 if (sc->dc_miibus) 2324 device_delete_child(dev, sc->dc_miibus); 2325 bus_generic_detach(dev); 2326 2327 if (sc->dc_intrhand) --- 1431 unchanged lines hidden --- |