Deleted Added
full compact
if_sf.c (113609) if_sf.c (113812)
1/*
2 * Copyright (c) 1997, 1998, 1999
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

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

73 * PCI memory mapped mode, the entire register space can be accessed
74 * directly. However in I/O space mode, only 256 bytes are directly
75 * mapped into PCI I/O space. The other registers can be accessed
76 * indirectly using the SF_INDIRECTIO_ADDR and SF_INDIRECTIO_DATA
77 * registers inside the 256-byte I/O window.
78 */
79
80#include <sys/cdefs.h>
1/*
2 * Copyright (c) 1997, 1998, 1999
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

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

73 * PCI memory mapped mode, the entire register space can be accessed
74 * directly. However in I/O space mode, only 256 bytes are directly
75 * mapped into PCI I/O space. The other registers can be accessed
76 * indirectly using the SF_INDIRECTIO_ADDR and SF_INDIRECTIO_DATA
77 * registers inside the 256-byte I/O window.
78 */
79
80#include <sys/cdefs.h>
81__FBSDID("$FreeBSD: head/sys/dev/sf/if_sf.c 113609 2003-04-17 20:32:06Z njl $");
81__FBSDID("$FreeBSD: head/sys/dev/sf/if_sf.c 113812 2003-04-21 18:34:04Z imp $");
82
83#include <sys/param.h>
84#include <sys/systm.h>
85#include <sys/sockio.h>
86#include <sys/mbuf.h>
87#include <sys/malloc.h>
88#include <sys/kernel.h>
89#include <sys/socket.h>

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

824 struct ifnet *ifp;
825
826 sc = device_get_softc(dev);
827 KASSERT(mtx_initialized(&sc->sf_mtx), ("sf mutex not initialized"));
828 SF_LOCK(sc);
829 ifp = &sc->arpcom.ac_if;
830
831 /* These should only be active if attach succeeded */
82
83#include <sys/param.h>
84#include <sys/systm.h>
85#include <sys/sockio.h>
86#include <sys/mbuf.h>
87#include <sys/malloc.h>
88#include <sys/kernel.h>
89#include <sys/socket.h>

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

824 struct ifnet *ifp;
825
826 sc = device_get_softc(dev);
827 KASSERT(mtx_initialized(&sc->sf_mtx), ("sf mutex not initialized"));
828 SF_LOCK(sc);
829 ifp = &sc->arpcom.ac_if;
830
831 /* These should only be active if attach succeeded */
832 if (device_is_alive(dev)) {
832 if (device_is_attached(dev)) {
833 sf_stop(sc);
834 ether_ifdetach(ifp);
835 }
836 if (sc->sf_miibus)
837 device_delete_child(dev, sc->sf_miibus);
838 bus_generic_detach(dev);
839
840 if (sc->sf_intrhand)

--- 703 unchanged lines hidden ---
833 sf_stop(sc);
834 ether_ifdetach(ifp);
835 }
836 if (sc->sf_miibus)
837 device_delete_child(dev, sc->sf_miibus);
838 bus_generic_detach(dev);
839
840 if (sc->sf_intrhand)

--- 703 unchanged lines hidden ---