Deleted Added
full compact
if_nve.c (150220) if_nve.c (150306)
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>
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 150220 2005-09-16 12:49:06Z ru $");
77__FBSDID("$FreeBSD: head/sys/dev/nve/if_nve.c 150306 2005-09-19 03:10:21Z imp $");
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>

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

554 NVE_LOCK(sc);
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);
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>

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

554 NVE_LOCK(sc);
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 /* XXX shouldn't hold lock over call to ether_ifdetch */
562 ether_ifdetach(ifp);
563 }
564
563 ether_ifdetach(ifp);
564 }
565
565 if (ifp)
566 if_free(ifp);
567
568 if (sc->miibus)
569 device_delete_child(dev, sc->miibus);
570 bus_generic_detach(dev);
571
572 /* Reload unreversed address back into MAC in original state */
573 if (sc->original_mac_addr)
574 sc->hwapi->pfnSetNodeAddress(sc->hwapi->pADCX,
575 sc->original_mac_addr);

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

596 if (sc->mtag)
597 bus_dma_tag_destroy(sc->mtag);
598 if (sc->ttag)
599 bus_dma_tag_destroy(sc->ttag);
600 if (sc->rtag)
601 bus_dma_tag_destroy(sc->rtag);
602
603 NVE_UNLOCK(sc);
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);

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

594 if (sc->mtag)
595 bus_dma_tag_destroy(sc->mtag);
596 if (sc->ttag)
597 bus_dma_tag_destroy(sc->ttag);
598 if (sc->rtag)
599 bus_dma_tag_destroy(sc->rtag);
600
601 NVE_UNLOCK(sc);
602 if (ifp)
603 if_free(ifp);
604 mtx_destroy(&sc->mtx);
605 mtx_destroy(&sc->osmtx);
606
607 DEBUGOUT(NVE_DEBUG_DEINIT, "nve: nve_detach - exit\n");
608
609 return (0);
610}
611

--- 1116 unchanged lines hidden ---
604 mtx_destroy(&sc->mtx);
605 mtx_destroy(&sc->osmtx);
606
607 DEBUGOUT(NVE_DEBUG_DEINIT, "nve: nve_detach - exit\n");
608
609 return (0);
610}
611

--- 1116 unchanged lines hidden ---