Deleted Added
full compact
if_vr.c (51583) if_vr.c (51657)
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

--- 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
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/vr/if_vr.c 51583 1999-09-23 03:32:57Z wpaul $
32 * $FreeBSD: head/sys/dev/vr/if_vr.c 51657 1999-09-25 17:29:02Z wpaul $
33 */
34
35/*
36 * VIA Rhine fast ethernet PCI NIC driver
37 *
38 * Supports various network adapters based on the VIA Rhine
39 * and Rhine II PCI controllers, including the D-Link DFE530TX.
40 * Datasheets are available at http://www.via.com.tw.

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

100
101#include <pci/if_vrreg.h>
102
103/* "controller miibus0" required. See GENERIC if you get errors here. */
104#include "miibus_if.h"
105
106#ifndef lint
107static const char rcsid[] =
33 */
34
35/*
36 * VIA Rhine fast ethernet PCI NIC driver
37 *
38 * Supports various network adapters based on the VIA Rhine
39 * and Rhine II PCI controllers, including the D-Link DFE530TX.
40 * Datasheets are available at http://www.via.com.tw.

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

100
101#include <pci/if_vrreg.h>
102
103/* "controller miibus0" required. See GENERIC if you get errors here. */
104#include "miibus_if.h"
105
106#ifndef lint
107static const char rcsid[] =
108 "$FreeBSD: head/sys/dev/vr/if_vr.c 51583 1999-09-23 03:32:57Z wpaul $";
108 "$FreeBSD: head/sys/dev/vr/if_vr.c 51657 1999-09-25 17:29:02Z wpaul $";
109#endif
110
111/*
112 * Various supported device vendors/types and their names.
113 */
114static struct vr_type vr_devs[] = {
115 { VIA_VENDORID, VIA_DEVICEID_RHINE,
116 "VIA VT3043 Rhine I 10/100BaseTX" },

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

751 * A Rhine chip was detected. Inform the world.
752 */
753 printf("vr%d: Ethernet address: %6D\n", unit, eaddr, ":");
754
755 sc->vr_unit = unit;
756 bcopy(eaddr, (char *)&sc->arpcom.ac_enaddr, ETHER_ADDR_LEN);
757
758 sc->vr_ldata = contigmalloc(sizeof(struct vr_list_data), M_DEVBUF,
109#endif
110
111/*
112 * Various supported device vendors/types and their names.
113 */
114static struct vr_type vr_devs[] = {
115 { VIA_VENDORID, VIA_DEVICEID_RHINE,
116 "VIA VT3043 Rhine I 10/100BaseTX" },

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

751 * A Rhine chip was detected. Inform the world.
752 */
753 printf("vr%d: Ethernet address: %6D\n", unit, eaddr, ":");
754
755 sc->vr_unit = unit;
756 bcopy(eaddr, (char *)&sc->arpcom.ac_enaddr, ETHER_ADDR_LEN);
757
758 sc->vr_ldata = contigmalloc(sizeof(struct vr_list_data), M_DEVBUF,
759 M_NOWAIT, 0x100000, 0xffffffff, PAGE_SIZE, 0);
759 M_NOWAIT, 0, 0xffffffff, PAGE_SIZE, 0);
760
761 if (sc->vr_ldata == NULL) {
762 printf("vr%d: no memory for list buffers!\n", unit);
763 bus_teardown_intr(dev, sc->vr_irq, sc->vr_intrhand);
764 bus_release_resource(dev, SYS_RES_IRQ, 0, sc->vr_irq);
765 bus_release_resource(dev, VR_RES, VR_RID, sc->vr_res);
766 error = ENXIO;
767 goto fail;

--- 896 unchanged lines hidden ---
760
761 if (sc->vr_ldata == NULL) {
762 printf("vr%d: no memory for list buffers!\n", unit);
763 bus_teardown_intr(dev, sc->vr_irq, sc->vr_intrhand);
764 bus_release_resource(dev, SYS_RES_IRQ, 0, sc->vr_irq);
765 bus_release_resource(dev, VR_RES, VR_RID, sc->vr_res);
766 error = ENXIO;
767 goto fail;

--- 896 unchanged lines hidden ---