Deleted Added
full compact
if_ti.c (68621) if_ti.c (69583)
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 68621 2000-11-11 23:08:22Z bmilekic $
32 * $FreeBSD: head/sys/dev/ti/if_ti.c 69583 2000-12-04 22:46:50Z wpaul $
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>

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

120#include <pci/if_tireg.h>
121#include <pci/ti_fw.h>
122#include <pci/ti_fw2.h>
123
124#define TI_CSUM_FEATURES (CSUM_IP | CSUM_TCP | CSUM_UDP | CSUM_IP_FRAGS)
125
126#if !defined(lint)
127static 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>

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

120#include <pci/if_tireg.h>
121#include <pci/ti_fw.h>
122#include <pci/ti_fw2.h>
123
124#define TI_CSUM_FEATURES (CSUM_IP | CSUM_TCP | CSUM_UDP | CSUM_IP_FRAGS)
125
126#if !defined(lint)
127static const char rcsid[] =
128 "$FreeBSD: head/sys/dev/ti/if_ti.c 68621 2000-11-11 23:08:22Z bmilekic $";
128 "$FreeBSD: head/sys/dev/ti/if_ti.c 69583 2000-12-04 22:46:50Z wpaul $";
129#endif
130
131/*
132 * Various supported device vendors/types and their names.
133 */
134
135static struct ti_type ti_devs[] = {
136 { ALT_VENDORID, ALT_DEVICEID_ACENIC,

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

1471 struct ifnet *ifp;
1472 struct ti_softc *sc;
1473 int unit, error = 0, rid;
1474
1475 sc = device_get_softc(dev);
1476 unit = device_get_unit(dev);
1477 bzero(sc, sizeof(struct ti_softc));
1478
129#endif
130
131/*
132 * Various supported device vendors/types and their names.
133 */
134
135static struct ti_type ti_devs[] = {
136 { ALT_VENDORID, ALT_DEVICEID_ACENIC,

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

1471 struct ifnet *ifp;
1472 struct ti_softc *sc;
1473 int unit, error = 0, rid;
1474
1475 sc = device_get_softc(dev);
1476 unit = device_get_unit(dev);
1477 bzero(sc, sizeof(struct ti_softc));
1478
1479 mtx_init(&sc->ti_mtx, device_get_nameunit(dev), MTX_DEF);
1480 TI_LOCK(sc);
1481
1479 /*
1480 * Map control/status registers.
1481 */
1482 command = pci_read_config(dev, PCIR_COMMAND, 4);
1483 command |= (PCIM_CMD_MEMEN|PCIM_CMD_BUSMASTEREN);
1484 pci_write_config(dev, PCIR_COMMAND, command, 4);
1485 command = pci_read_config(dev, PCIR_COMMAND, 4);
1486

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

1522 if (error) {
1523 bus_release_resource(dev, SYS_RES_IRQ, 0, sc->ti_irq);
1524 bus_release_resource(dev, SYS_RES_MEMORY,
1525 TI_PCI_LOMEM, sc->ti_res);
1526 printf("ti%d: couldn't set up irq\n", unit);
1527 goto fail;
1528 }
1529
1482 /*
1483 * Map control/status registers.
1484 */
1485 command = pci_read_config(dev, PCIR_COMMAND, 4);
1486 command |= (PCIM_CMD_MEMEN|PCIM_CMD_BUSMASTEREN);
1487 pci_write_config(dev, PCIR_COMMAND, command, 4);
1488 command = pci_read_config(dev, PCIR_COMMAND, 4);
1489

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

1525 if (error) {
1526 bus_release_resource(dev, SYS_RES_IRQ, 0, sc->ti_irq);
1527 bus_release_resource(dev, SYS_RES_MEMORY,
1528 TI_PCI_LOMEM, sc->ti_res);
1529 printf("ti%d: couldn't set up irq\n", unit);
1530 goto fail;
1531 }
1532
1530 mtx_init(&sc->ti_mtx, device_get_nameunit(dev), MTX_DEF);
1531 TI_LOCK(sc);
1532
1533 sc->ti_unit = unit;
1534
1535 if (ti_chipinit(sc)) {
1536 printf("ti%d: chip initialization failed\n", sc->ti_unit);
1537 bus_teardown_intr(dev, sc->ti_irq, sc->ti_intrhand);
1538 bus_release_resource(dev, SYS_RES_IRQ, 0, sc->ti_irq);
1539 bus_release_resource(dev, SYS_RES_MEMORY,
1540 TI_PCI_LOMEM, sc->ti_res);

--- 966 unchanged lines hidden ---
1533 sc->ti_unit = unit;
1534
1535 if (ti_chipinit(sc)) {
1536 printf("ti%d: chip initialization failed\n", sc->ti_unit);
1537 bus_teardown_intr(dev, sc->ti_irq, sc->ti_intrhand);
1538 bus_release_resource(dev, SYS_RES_IRQ, 0, sc->ti_irq);
1539 bus_release_resource(dev, SYS_RES_MEMORY,
1540 TI_PCI_LOMEM, sc->ti_res);

--- 966 unchanged lines hidden ---