Deleted Added
full compact
if_wb.c (150636) if_wb.c (151297)
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

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

26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 * THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33#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

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

26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 * THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: head/sys/pci/if_wb.c 150636 2005-09-27 18:10:43Z mlaier $");
34__FBSDID("$FreeBSD: head/sys/pci/if_wb.c 151297 2005-10-13 21:11:20Z ru $");
35
36/*
37 * Winbond fast ethernet PCI NIC driver
38 *
39 * Supports various cheap network adapters based on the Winbond W89C840F
40 * fast ethernet controller chip. This includes adapters manufactured by
41 * Winbond itself and some made by Linksys.
42 *

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

915 /*
916 * Delete any miibus and phy devices attached to this interface.
917 * This should only be done if attach succeeded.
918 */
919 if (device_is_attached(dev)) {
920 wb_stop(sc);
921 ether_ifdetach(ifp);
922 }
35
36/*
37 * Winbond fast ethernet PCI NIC driver
38 *
39 * Supports various cheap network adapters based on the Winbond W89C840F
40 * fast ethernet controller chip. This includes adapters manufactured by
41 * Winbond itself and some made by Linksys.
42 *

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

915 /*
916 * Delete any miibus and phy devices attached to this interface.
917 * This should only be done if attach succeeded.
918 */
919 if (device_is_attached(dev)) {
920 wb_stop(sc);
921 ether_ifdetach(ifp);
922 }
923 if (ifp)
924 if_free(ifp);
925 if (sc->wb_miibus)
926 device_delete_child(dev, sc->wb_miibus);
927 bus_generic_detach(dev);
928
929 if (sc->wb_intrhand)
930 bus_teardown_intr(dev, sc->wb_irq, sc->wb_intrhand);
931 if (sc->wb_irq)
932 bus_release_resource(dev, SYS_RES_IRQ, 0, sc->wb_irq);
933 if (sc->wb_res)
934 bus_release_resource(dev, WB_RES, WB_RID, sc->wb_res);
935
923 if (sc->wb_miibus)
924 device_delete_child(dev, sc->wb_miibus);
925 bus_generic_detach(dev);
926
927 if (sc->wb_intrhand)
928 bus_teardown_intr(dev, sc->wb_irq, sc->wb_intrhand);
929 if (sc->wb_irq)
930 bus_release_resource(dev, SYS_RES_IRQ, 0, sc->wb_irq);
931 if (sc->wb_res)
932 bus_release_resource(dev, WB_RES, WB_RID, sc->wb_res);
933
934 if (ifp)
935 if_free(ifp);
936
936 if (sc->wb_ldata) {
937 contigfree(sc->wb_ldata, sizeof(struct wb_list_data) + 8,
938 M_DEVBUF);
939 }
940
941 WB_UNLOCK(sc);
942 mtx_destroy(&sc->wb_mtx);
943

--- 888 unchanged lines hidden ---
937 if (sc->wb_ldata) {
938 contigfree(sc->wb_ldata, sizeof(struct wb_list_data) + 8,
939 M_DEVBUF);
940 }
941
942 WB_UNLOCK(sc);
943 mtx_destroy(&sc->wb_mtx);
944

--- 888 unchanged lines hidden ---