Deleted Added
full compact
if_lge.c (148887) if_lge.c (150306)
1/*-
2 * Copyright (c) 2001 Wind River Systems
3 * Copyright (c) 1997, 1998, 1999, 2000, 2001
4 * Bill Paul <william.paul@windriver.com>. 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:

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

27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
31 * THE POSSIBILITY OF SUCH DAMAGE.
32 */
33
34#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2001 Wind River Systems
3 * Copyright (c) 1997, 1998, 1999, 2000, 2001
4 * Bill Paul <william.paul@windriver.com>. 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:

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

27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
31 * THE POSSIBILITY OF SUCH DAMAGE.
32 */
33
34#include <sys/cdefs.h>
35__FBSDID("$FreeBSD: head/sys/dev/lge/if_lge.c 148887 2005-08-09 10:20:02Z rwatson $");
35__FBSDID("$FreeBSD: head/sys/dev/lge/if_lge.c 150306 2005-09-19 03:10:21Z imp $");
36
37/*
38 * Level 1 LXT1001 gigabit ethernet driver for FreeBSD. Public
39 * documentation not available, but ask me nicely.
40 *
41 * The Level 1 chip is used on some D-Link, SMC and Addtron NICs.
42 * It's a 64-bit PCI part that supports TCP/IP checksum offload,
43 * VLAN tagging/insertion, GMII and TBI (1000baseX) ports. There

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

622 s = splimp();
623
624 sc = device_get_softc(dev);
625 ifp = sc->lge_ifp;
626
627 lge_reset(sc);
628 lge_stop(sc);
629 ether_ifdetach(ifp);
36
37/*
38 * Level 1 LXT1001 gigabit ethernet driver for FreeBSD. Public
39 * documentation not available, but ask me nicely.
40 *
41 * The Level 1 chip is used on some D-Link, SMC and Addtron NICs.
42 * It's a 64-bit PCI part that supports TCP/IP checksum offload,
43 * VLAN tagging/insertion, GMII and TBI (1000baseX) ports. There

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

622 s = splimp();
623
624 sc = device_get_softc(dev);
625 ifp = sc->lge_ifp;
626
627 lge_reset(sc);
628 lge_stop(sc);
629 ether_ifdetach(ifp);
630 if_free(ifp);
631
632 bus_generic_detach(dev);
633 device_delete_child(dev, sc->lge_miibus);
634
635 bus_teardown_intr(dev, sc->lge_irq, sc->lge_intrhand);
636 bus_release_resource(dev, SYS_RES_IRQ, 0, sc->lge_irq);
637 bus_release_resource(dev, LGE_RES, LGE_RID, sc->lge_res);
638
639 contigfree(sc->lge_ldata, sizeof(struct lge_list_data), M_DEVBUF);
630
631 bus_generic_detach(dev);
632 device_delete_child(dev, sc->lge_miibus);
633
634 bus_teardown_intr(dev, sc->lge_irq, sc->lge_intrhand);
635 bus_release_resource(dev, SYS_RES_IRQ, 0, sc->lge_irq);
636 bus_release_resource(dev, LGE_RES, LGE_RID, sc->lge_res);
637
638 contigfree(sc->lge_ldata, sizeof(struct lge_list_data), M_DEVBUF);
639 if_free(ifp);
640 lge_free_jumbo_mem(sc);
641
642 splx(s);
643
644 return(0);
645}
646
647/*

--- 927 unchanged lines hidden ---
640 lge_free_jumbo_mem(sc);
641
642 splx(s);
643
644 return(0);
645}
646
647/*

--- 927 unchanged lines hidden ---