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

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

77 * Note: the author of the Linux driver for the Winbond chip alludes
78 * to some sort of flaw in the chip's design that seems to mandate some
79 * drastic workaround which signigicantly impairs transmit performance.
80 * I have no idea what he's on about: transmit performance with all
81 * three of my test boards seems fine.
82 */
83
84#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

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

77 * Note: the author of the Linux driver for the Winbond chip alludes
78 * to some sort of flaw in the chip's design that seems to mandate some
79 * drastic workaround which signigicantly impairs transmit performance.
80 * I have no idea what he's on about: transmit performance with all
81 * three of my test boards seems fine.
82 */
83
84#include <sys/cdefs.h>
85__FBSDID("$FreeBSD: head/sys/pci/if_wb.c 113812 2003-04-21 18:34:04Z imp $");
85__FBSDID("$FreeBSD: head/sys/pci/if_wb.c 117208 2003-07-03 21:39:53Z imp $");
86
87#include "opt_bdg.h"
88
89#include <sys/param.h>
90#include <sys/systm.h>
91#include <sys/sockio.h>
92#include <sys/mbuf.h>
93#include <sys/malloc.h>

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

824 struct ifnet *ifp;
825 int unit, error = 0, rid;
826
827 sc = device_get_softc(dev);
828 unit = device_get_unit(dev);
829
830 mtx_init(&sc->wb_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK,
831 MTX_DEF | MTX_RECURSE);
86
87#include "opt_bdg.h"
88
89#include <sys/param.h>
90#include <sys/systm.h>
91#include <sys/sockio.h>
92#include <sys/mbuf.h>
93#include <sys/malloc.h>

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

824 struct ifnet *ifp;
825 int unit, error = 0, rid;
826
827 sc = device_get_softc(dev);
828 unit = device_get_unit(dev);
829
830 mtx_init(&sc->wb_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK,
831 MTX_DEF | MTX_RECURSE);
832
832#ifndef BURN_BRIDGES
833 /*
834 * Handle power management nonsense.
835 */
836
837 if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) {
838 u_int32_t iobase, membase, irq;
839
840 /* Save important PCI config data. */

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

848 pci_get_powerstate(dev));
849 pci_set_powerstate(dev, PCI_POWERSTATE_D0);
850
851 /* Restore PCI config data. */
852 pci_write_config(dev, WB_PCI_LOIO, iobase, 4);
853 pci_write_config(dev, WB_PCI_LOMEM, membase, 4);
854 pci_write_config(dev, WB_PCI_INTLINE, irq, 4);
855 }
833 /*
834 * Handle power management nonsense.
835 */
836
837 if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) {
838 u_int32_t iobase, membase, irq;
839
840 /* Save important PCI config data. */

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

848 pci_get_powerstate(dev));
849 pci_set_powerstate(dev, PCI_POWERSTATE_D0);
850
851 /* Restore PCI config data. */
852 pci_write_config(dev, WB_PCI_LOIO, iobase, 4);
853 pci_write_config(dev, WB_PCI_LOMEM, membase, 4);
854 pci_write_config(dev, WB_PCI_INTLINE, irq, 4);
855 }
856
856#endif
857 /*
858 * Map control/status registers.
859 */
860 pci_enable_busmaster(dev);
861
862 rid = WB_RID;
863 sc->wb_res = bus_alloc_resource(dev, WB_RES, &rid,
864 0, ~0, 1, RF_ACTIVE);

--- 1027 unchanged lines hidden ---
857 /*
858 * Map control/status registers.
859 */
860 pci_enable_busmaster(dev);
861
862 rid = WB_RID;
863 sc->wb_res = bus_alloc_resource(dev, WB_RES, &rid,
864 0, ~0, 1, RF_ACTIVE);

--- 1027 unchanged lines hidden ---