1/*
2 * Copyright (c) 2005 by David E. O'Brien <obrien@FreeBSD.org>.
3 * Copyright (c) 2003,2004 by Quinton Dolan <q@onthenet.com.au>.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
--- 60 unchanged lines hidden (view full) ---
69 *
70 * Written by Quinton Dolan <q@onthenet.com.au>
71 * Portions based on existing FreeBSD network drivers.
72 * NVIDIA API usage derived from distributed NVIDIA NVNET driver source files.
73 *
74 */
75
76#include <sys/cdefs.h>
77__FBSDID("$FreeBSD: head/sys/dev/nve/if_nve.c 148887 2005-08-09 10:20:02Z rwatson $");
78
79#include <sys/param.h>
80#include <sys/systm.h>
81#include <sys/sockio.h>
82#include <sys/mbuf.h>
83#include <sys/malloc.h>
84#include <sys/kernel.h>
85#include <sys/socket.h>
--- 469 unchanged lines hidden (view full) ---
555
556 DEBUGOUT(NVE_DEBUG_DEINIT, "nve: nve_detach - entry\n");
557
558 ifp = sc->ifp;
559
560 if (device_is_attached(dev)) {
561 nve_stop(sc);
562 ether_ifdetach(ifp);
563 if_free(ifp);
564 }
565
566 if (sc->miibus)
567 device_delete_child(dev, sc->miibus);
568 bus_generic_detach(dev);
569
570 /* Reload unreversed address back into MAC in original state */
571 if (sc->original_mac_addr)
572 sc->hwapi->pfnSetNodeAddress(sc->hwapi->pADCX,
573 sc->original_mac_addr);
--- 1152 unchanged lines hidden ---
2 * Copyright (c) 2005 by David E. O'Brien <obrien@FreeBSD.org>.
3 * Copyright (c) 2003,2004 by Quinton Dolan <q@onthenet.com.au>.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
--- 60 unchanged lines hidden (view full) ---
69 *
70 * Written by Quinton Dolan <q@onthenet.com.au>
71 * Portions based on existing FreeBSD network drivers.
72 * NVIDIA API usage derived from distributed NVIDIA NVNET driver source files.
73 *
74 */
75
76#include <sys/cdefs.h>
77__FBSDID("$FreeBSD: head/sys/dev/nve/if_nve.c 148887 2005-08-09 10:20:02Z rwatson $");
78
79#include <sys/param.h>
80#include <sys/systm.h>
81#include <sys/sockio.h>
82#include <sys/mbuf.h>
83#include <sys/malloc.h>
84#include <sys/kernel.h>
85#include <sys/socket.h>
--- 469 unchanged lines hidden (view full) ---
555
556 DEBUGOUT(NVE_DEBUG_DEINIT, "nve: nve_detach - entry\n");
557
558 ifp = sc->ifp;
559
560 if (device_is_attached(dev)) {
561 nve_stop(sc);
562 ether_ifdetach(ifp);
563 if_free(ifp);
564 }
565
566 if (sc->miibus)
567 device_delete_child(dev, sc->miibus);
568 bus_generic_detach(dev);
569
570 /* Reload unreversed address back into MAC in original state */
571 if (sc->original_mac_addr)
572 sc->hwapi->pfnSetNodeAddress(sc->hwapi->pADCX,
573 sc->original_mac_addr);
--- 1152 unchanged lines hidden ---