if_vr.c (113609) | if_vr.c (113812) |
---|---|
1/* 2 * Copyright (c) 1997, 1998 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 --- 44 unchanged lines hidden (view full) --- 53 * The Rhine has a serious flaw in its transmit DMA mechanism: 54 * transmit buffers must be longword aligned. Unfortunately, 55 * FreeBSD doesn't guarantee that mbufs will be filled in starting 56 * at longword boundaries, so we have to do a buffer copy before 57 * transmission. 58 */ 59 60#include <sys/cdefs.h> | 1/* 2 * Copyright (c) 1997, 1998 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 --- 44 unchanged lines hidden (view full) --- 53 * The Rhine has a serious flaw in its transmit DMA mechanism: 54 * transmit buffers must be longword aligned. Unfortunately, 55 * FreeBSD doesn't guarantee that mbufs will be filled in starting 56 * at longword boundaries, so we have to do a buffer copy before 57 * transmission. 58 */ 59 60#include <sys/cdefs.h> |
61__FBSDID("$FreeBSD: head/sys/dev/vr/if_vr.c 113609 2003-04-17 20:32:06Z njl $"); | 61__FBSDID("$FreeBSD: head/sys/dev/vr/if_vr.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> --- 840 unchanged lines hidden (view full) --- 910 struct ifnet *ifp; 911 912 sc = device_get_softc(dev); 913 KASSERT(mtx_initialized(&sc->vr_mtx), ("vr mutex not initialized")); 914 VR_LOCK(sc); 915 ifp = &sc->arpcom.ac_if; 916 917 /* 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> --- 840 unchanged lines hidden (view full) --- 910 struct ifnet *ifp; 911 912 sc = device_get_softc(dev); 913 KASSERT(mtx_initialized(&sc->vr_mtx), ("vr mutex not initialized")); 914 VR_LOCK(sc); 915 ifp = &sc->arpcom.ac_if; 916 917 /* These should only be active if attach succeeded */ |
918 if (device_is_alive(dev)) { | 918 if (device_is_attached(dev)) { |
919 vr_stop(sc); 920 ether_ifdetach(ifp); 921 } 922 if (sc->vr_miibus) 923 device_delete_child(dev, sc->vr_miibus); 924 bus_generic_detach(dev); 925 926 if (sc->vr_intrhand) --- 879 unchanged lines hidden --- | 919 vr_stop(sc); 920 ether_ifdetach(ifp); 921 } 922 if (sc->vr_miibus) 923 device_delete_child(dev, sc->vr_miibus); 924 bus_generic_detach(dev); 925 926 if (sc->vr_intrhand) --- 879 unchanged lines hidden --- |