if_ti.c (50477) | if_ti.c (50548) |
---|---|
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 --- 15 unchanged lines hidden (view full) --- 24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 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 * | 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 --- 15 unchanged lines hidden (view full) --- 24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 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 * $FreeBSD: head/sys/dev/ti/if_ti.c 50477 1999-08-28 01:08:13Z peter $ | 32 * $FreeBSD: head/sys/dev/ti/if_ti.c 50548 1999-08-29 09:03:58Z bde $ |
33 */ 34 35/* 36 * Alteon Networks Tigon PCI gigabit ethernet driver for FreeBSD. 37 * Manuals, sample driver and firmware source kits are available 38 * from http://www.alteon.com/support/openkits. 39 * 40 * Written by Bill Paul <wpaul@ctr.columbia.edu> --- 85 unchanged lines hidden (view full) --- 126#include <pci/ti_fw2.h> 127 128#ifdef M_HWCKSUM 129/*#define TI_CSUM_OFFLOAD*/ 130#endif 131 132#if !defined(lint) 133static const char rcsid[] = | 33 */ 34 35/* 36 * Alteon Networks Tigon PCI gigabit ethernet driver for FreeBSD. 37 * Manuals, sample driver and firmware source kits are available 38 * from http://www.alteon.com/support/openkits. 39 * 40 * Written by Bill Paul <wpaul@ctr.columbia.edu> --- 85 unchanged lines hidden (view full) --- 126#include <pci/ti_fw2.h> 127 128#ifdef M_HWCKSUM 129/*#define TI_CSUM_OFFLOAD*/ 130#endif 131 132#if !defined(lint) 133static const char rcsid[] = |
134 "$FreeBSD: head/sys/dev/ti/if_ti.c 50477 1999-08-28 01:08:13Z peter $"; | 134 "$FreeBSD: head/sys/dev/ti/if_ti.c 50548 1999-08-29 09:03:58Z bde $"; |
135#endif 136 137/* 138 * Various supported device vendors/types and their names. 139 */ 140 141static struct ti_type ti_devs[] = { 142 { ALT_VENDORID, ALT_DEVICEID_ACENIC, --- 455 unchanged lines hidden (view full) --- 598 struct ti_softc *sc; 599{ 600 caddr_t ptr; 601 register int i; 602 struct ti_jpool_entry *entry; 603 604 /* Grab a big chunk o' storage. */ 605 sc->ti_cdata.ti_jumbo_buf = contigmalloc(TI_JMEM, M_DEVBUF, | 135#endif 136 137/* 138 * Various supported device vendors/types and their names. 139 */ 140 141static struct ti_type ti_devs[] = { 142 { ALT_VENDORID, ALT_DEVICEID_ACENIC, --- 455 unchanged lines hidden (view full) --- 598 struct ti_softc *sc; 599{ 600 caddr_t ptr; 601 register int i; 602 struct ti_jpool_entry *entry; 603 604 /* Grab a big chunk o' storage. */ 605 sc->ti_cdata.ti_jumbo_buf = contigmalloc(TI_JMEM, M_DEVBUF, |
606 M_NOWAIT, 0x100000, 0xffffffff, PAGE_SIZE, 0); | 606 M_NOWAIT, 0, 0xffffffff, PAGE_SIZE, 0); |
607 608 if (sc->ti_cdata.ti_jumbo_buf == NULL) { 609 printf("ti%d: no memory for jumbo buffers!\n", sc->ti_unit); 610 return(ENOBUFS); 611 } 612 613 SLIST_INIT(&sc->ti_jfree_listhead); 614 SLIST_INIT(&sc->ti_jinuse_listhead); --- 1043 unchanged lines hidden (view full) --- 1658 /* 1659 * A Tigon chip was detected. Inform the world. 1660 */ 1661 printf("ti%d: Ethernet address: %6D\n", unit, 1662 sc->arpcom.ac_enaddr, ":"); 1663 1664 /* Allocate the general information block and ring buffers. */ 1665 sc->ti_rdata = contigmalloc(sizeof(struct ti_ring_data), M_DEVBUF, | 607 608 if (sc->ti_cdata.ti_jumbo_buf == NULL) { 609 printf("ti%d: no memory for jumbo buffers!\n", sc->ti_unit); 610 return(ENOBUFS); 611 } 612 613 SLIST_INIT(&sc->ti_jfree_listhead); 614 SLIST_INIT(&sc->ti_jinuse_listhead); --- 1043 unchanged lines hidden (view full) --- 1658 /* 1659 * A Tigon chip was detected. Inform the world. 1660 */ 1661 printf("ti%d: Ethernet address: %6D\n", unit, 1662 sc->arpcom.ac_enaddr, ":"); 1663 1664 /* Allocate the general information block and ring buffers. */ 1665 sc->ti_rdata = contigmalloc(sizeof(struct ti_ring_data), M_DEVBUF, |
1666 M_NOWAIT, 0x100000, 0xffffffff, PAGE_SIZE, 0); | 1666 M_NOWAIT, 0, 0xffffffff, PAGE_SIZE, 0); |
1667 1668 if (sc->ti_rdata == NULL) { 1669 bus_teardown_intr(dev, sc->ti_irq, sc->ti_intrhand); 1670 bus_release_resource(dev, SYS_RES_IRQ, 0, sc->ti_irq); 1671 bus_release_resource(dev, SYS_RES_MEMORY, 1672 TI_PCI_LOMEM, sc->ti_res); 1673 error = ENXIO; 1674 printf("ti%d: no memory for list buffers!\n", sc->ti_unit); --- 843 unchanged lines hidden --- | 1667 1668 if (sc->ti_rdata == NULL) { 1669 bus_teardown_intr(dev, sc->ti_irq, sc->ti_intrhand); 1670 bus_release_resource(dev, SYS_RES_IRQ, 0, sc->ti_irq); 1671 bus_release_resource(dev, SYS_RES_MEMORY, 1672 TI_PCI_LOMEM, sc->ti_res); 1673 error = ENXIO; 1674 printf("ti%d: no memory for list buffers!\n", sc->ti_unit); --- 843 unchanged lines hidden --- |