Deleted Added
full compact
if_ste.c (69583) if_ste.c (71228)
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/pci/if_ste.c 69583 2000-12-04 22:46:50Z wpaul $
32 * $FreeBSD: head/sys/pci/if_ste.c 71228 2001-01-19 01:59:14Z bmilekic $
33 */
34
35#include <sys/param.h>
36#include <sys/systm.h>
37#include <sys/sockio.h>
38#include <sys/mbuf.h>
39#include <sys/malloc.h>
40#include <sys/kernel.h>

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

69#define STE_USEIOSPACE
70
71#include <pci/if_stereg.h>
72
73MODULE_DEPEND(ste, miibus, 1, 1, 1);
74
75#if !defined(lint)
76static const char rcsid[] =
33 */
34
35#include <sys/param.h>
36#include <sys/systm.h>
37#include <sys/sockio.h>
38#include <sys/mbuf.h>
39#include <sys/malloc.h>
40#include <sys/kernel.h>

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

69#define STE_USEIOSPACE
70
71#include <pci/if_stereg.h>
72
73MODULE_DEPEND(ste, miibus, 1, 1, 1);
74
75#if !defined(lint)
76static const char rcsid[] =
77 "$FreeBSD: head/sys/pci/if_ste.c 69583 2000-12-04 22:46:50Z wpaul $";
77 "$FreeBSD: head/sys/pci/if_ste.c 71228 2001-01-19 01:59:14Z bmilekic $";
78#endif
79
80/*
81 * Various supported device vendors/types and their names.
82 */
83static struct ste_type ste_devs[] = {
84 { ST_VENDORID, ST_DEVICEID_ST201, "Sundance ST201 10/100BaseTX" },
85 { DL_VENDORID, DL_DEVICEID_550TX, "D-Link DFE-550TX 10/100BaseTX" },

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

912 struct ste_softc *sc;
913 struct ifnet *ifp;
914 int unit, error = 0, rid;
915
916 sc = device_get_softc(dev);
917 unit = device_get_unit(dev);
918 bzero(sc, sizeof(struct ste_softc));
919
78#endif
79
80/*
81 * Various supported device vendors/types and their names.
82 */
83static struct ste_type ste_devs[] = {
84 { ST_VENDORID, ST_DEVICEID_ST201, "Sundance ST201 10/100BaseTX" },
85 { DL_VENDORID, DL_DEVICEID_550TX, "D-Link DFE-550TX 10/100BaseTX" },

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

912 struct ste_softc *sc;
913 struct ifnet *ifp;
914 int unit, error = 0, rid;
915
916 sc = device_get_softc(dev);
917 unit = device_get_unit(dev);
918 bzero(sc, sizeof(struct ste_softc));
919
920 mtx_init(&sc->ste_mtx, device_get_nameunit(dev), MTX_DEF);
920 mtx_init(&sc->ste_mtx, device_get_nameunit(dev), MTX_DEF | MTX_RECURSE);
921 STE_LOCK(sc);
922
923 /*
924 * Handle power management nonsense.
925 */
926 command = pci_read_config(dev, STE_PCI_CAPID, 4) & 0x000000FF;
927 if (command == 0x01) {
928

--- 667 unchanged lines hidden ---
921 STE_LOCK(sc);
922
923 /*
924 * Handle power management nonsense.
925 */
926 command = pci_read_config(dev, STE_PCI_CAPID, 4) & 0x000000FF;
927 if (command == 0x01) {
928

--- 667 unchanged lines hidden ---