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

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

53 * The Rhine has a serious flaw in its transmit DMA mechanism:
54 * transmit buffers must be longword aligned. Unfortunately,
55 * FreeBSD doesn't guarantee that mbufs will be filled in starting
56 * at longword boundaries, so we have to do a buffer copy before
57 * transmission.
58 */
59
60#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

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

53 * The Rhine has a serious flaw in its transmit DMA mechanism:
54 * transmit buffers must be longword aligned. Unfortunately,
55 * FreeBSD doesn't guarantee that mbufs will be filled in starting
56 * at longword boundaries, so we have to do a buffer copy before
57 * transmission.
58 */
59
60#include <sys/cdefs.h>
61__FBSDID("$FreeBSD: head/sys/dev/vr/if_vr.c 113812 2003-04-21 18:34:04Z imp $");
61__FBSDID("$FreeBSD: head/sys/dev/vr/if_vr.c 117208 2003-07-03 21:39:53Z imp $");
62
63#include <sys/param.h>
64#include <sys/systm.h>
65#include <sys/sockio.h>
66#include <sys/mbuf.h>
67#include <sys/malloc.h>
68#include <sys/kernel.h>
69#include <sys/socket.h>

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

739 struct ifnet *ifp;
740 int unit, error = 0, rid;
741
742 sc = device_get_softc(dev);
743 unit = device_get_unit(dev);
744
745 mtx_init(&sc->vr_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK,
746 MTX_DEF | MTX_RECURSE);
62
63#include <sys/param.h>
64#include <sys/systm.h>
65#include <sys/sockio.h>
66#include <sys/mbuf.h>
67#include <sys/malloc.h>
68#include <sys/kernel.h>
69#include <sys/socket.h>

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

739 struct ifnet *ifp;
740 int unit, error = 0, rid;
741
742 sc = device_get_softc(dev);
743 unit = device_get_unit(dev);
744
745 mtx_init(&sc->vr_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK,
746 MTX_DEF | MTX_RECURSE);
747
747#ifndef BURN_BRIDGES
748 /*
749 * Handle power management nonsense.
750 */
751 if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) {
752 u_int32_t iobase, membase, irq;
753
754 /* Save important PCI config data. */
755 iobase = pci_read_config(dev, VR_PCI_LOIO, 4);

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

762 pci_get_powerstate(dev));
763 pci_set_powerstate(dev, PCI_POWERSTATE_D0);
764
765 /* Restore PCI config data. */
766 pci_write_config(dev, VR_PCI_LOIO, iobase, 4);
767 pci_write_config(dev, VR_PCI_LOMEM, membase, 4);
768 pci_write_config(dev, VR_PCI_INTLINE, irq, 4);
769 }
748 /*
749 * Handle power management nonsense.
750 */
751 if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) {
752 u_int32_t iobase, membase, irq;
753
754 /* Save important PCI config data. */
755 iobase = pci_read_config(dev, VR_PCI_LOIO, 4);

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

762 pci_get_powerstate(dev));
763 pci_set_powerstate(dev, PCI_POWERSTATE_D0);
764
765 /* Restore PCI config data. */
766 pci_write_config(dev, VR_PCI_LOIO, iobase, 4);
767 pci_write_config(dev, VR_PCI_LOMEM, membase, 4);
768 pci_write_config(dev, VR_PCI_INTLINE, irq, 4);
769 }
770
770#endif
771 /*
772 * Map control/status registers.
773 */
774 pci_enable_busmaster(dev);
775 sc->vr_revid = pci_read_config(dev, VR_PCI_REVID, 4) & 0x000000FF;
776
777 rid = VR_RID;
778 sc->vr_res = bus_alloc_resource(dev, VR_RES, &rid,

--- 1027 unchanged lines hidden ---
771 /*
772 * Map control/status registers.
773 */
774 pci_enable_busmaster(dev);
775 sc->vr_revid = pci_read_config(dev, VR_PCI_REVID, 4) & 0x000000FF;
776
777 rid = VR_RID;
778 sc->vr_res = bus_alloc_resource(dev, VR_RES, &rid,

--- 1027 unchanged lines hidden ---