Deleted Added
full compact
if_sk.c (115528) if_sk.c (117208)
1/*
2 * Copyright (c) 1997, 1998, 1999, 2000
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

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

62 * SysKonnect has the distinction of being the only vendor on the market
63 * with a dual port gigabit ethernet NIC. The GEnesis provides dual FIFOs,
64 * dual DMA queues, packet/MAC/transmit arbiters and direct access to the
65 * XMAC registers. This driver takes advantage of these features to allow
66 * both XMACs to operate as independent interfaces.
67 */
68
69#include <sys/cdefs.h>
1/*
2 * Copyright (c) 1997, 1998, 1999, 2000
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

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

62 * SysKonnect has the distinction of being the only vendor on the market
63 * with a dual port gigabit ethernet NIC. The GEnesis provides dual FIFOs,
64 * dual DMA queues, packet/MAC/transmit arbiters and direct access to the
65 * XMAC registers. This driver takes advantage of these features to allow
66 * both XMACs to operate as independent interfaces.
67 */
68
69#include <sys/cdefs.h>
70__FBSDID("$FreeBSD: head/sys/dev/sk/if_sk.c 115528 2003-05-31 19:58:45Z phk $");
70__FBSDID("$FreeBSD: head/sys/dev/sk/if_sk.c 117208 2003-07-03 21:39:53Z imp $");
71
72#include <sys/param.h>
73#include <sys/systm.h>
74#include <sys/sockio.h>
75#include <sys/mbuf.h>
76#include <sys/malloc.h>
77#include <sys/kernel.h>
78#include <sys/socket.h>

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

111MODULE_DEPEND(sk, ether, 1, 1, 1);
112MODULE_DEPEND(sk, miibus, 1, 1, 1);
113
114/* "controller miibus0" required. See GENERIC if you get errors here. */
115#include "miibus_if.h"
116
117#ifndef lint
118static const char rcsid[] =
71
72#include <sys/param.h>
73#include <sys/systm.h>
74#include <sys/sockio.h>
75#include <sys/mbuf.h>
76#include <sys/malloc.h>
77#include <sys/kernel.h>
78#include <sys/socket.h>

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

111MODULE_DEPEND(sk, ether, 1, 1, 1);
112MODULE_DEPEND(sk, miibus, 1, 1, 1);
113
114/* "controller miibus0" required. See GENERIC if you get errors here. */
115#include "miibus_if.h"
116
117#ifndef lint
118static const char rcsid[] =
119 "$FreeBSD: head/sys/dev/sk/if_sk.c 115528 2003-05-31 19:58:45Z phk $";
119 "$FreeBSD: head/sys/dev/sk/if_sk.c 117208 2003-07-03 21:39:53Z imp $";
120#endif
121
122static struct sk_type sk_devs[] = {
123 { SK_VENDORID, SK_DEVICEID_GE, "SysKonnect Gigabit Ethernet" },
124 { 0, 0, NULL }
125};
126
127static int sk_probe (device_t);

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

1205 struct sk_softc *sc;
1206 int unit, error = 0, rid, *port;
1207
1208 sc = device_get_softc(dev);
1209 unit = device_get_unit(dev);
1210
1211 mtx_init(&sc->sk_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK,
1212 MTX_DEF | MTX_RECURSE);
120#endif
121
122static struct sk_type sk_devs[] = {
123 { SK_VENDORID, SK_DEVICEID_GE, "SysKonnect Gigabit Ethernet" },
124 { 0, 0, NULL }
125};
126
127static int sk_probe (device_t);

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

1205 struct sk_softc *sc;
1206 int unit, error = 0, rid, *port;
1207
1208 sc = device_get_softc(dev);
1209 unit = device_get_unit(dev);
1210
1211 mtx_init(&sc->sk_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK,
1212 MTX_DEF | MTX_RECURSE);
1213
1213#ifndef BURN_BRIDGES
1214 /*
1215 * Handle power management nonsense.
1216 */
1217 if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) {
1218 u_int32_t iobase, membase, irq;
1219
1220 /* Save important PCI config data. */
1221 iobase = pci_read_config(dev, SK_PCI_LOIO, 4);

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

1228 pci_get_powerstate(dev));
1229 pci_set_powerstate(dev, PCI_POWERSTATE_D0);
1230
1231 /* Restore PCI config data. */
1232 pci_write_config(dev, SK_PCI_LOIO, iobase, 4);
1233 pci_write_config(dev, SK_PCI_LOMEM, membase, 4);
1234 pci_write_config(dev, SK_PCI_INTLINE, irq, 4);
1235 }
1214 /*
1215 * Handle power management nonsense.
1216 */
1217 if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) {
1218 u_int32_t iobase, membase, irq;
1219
1220 /* Save important PCI config data. */
1221 iobase = pci_read_config(dev, SK_PCI_LOIO, 4);

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

1228 pci_get_powerstate(dev));
1229 pci_set_powerstate(dev, PCI_POWERSTATE_D0);
1230
1231 /* Restore PCI config data. */
1232 pci_write_config(dev, SK_PCI_LOIO, iobase, 4);
1233 pci_write_config(dev, SK_PCI_LOMEM, membase, 4);
1234 pci_write_config(dev, SK_PCI_INTLINE, irq, 4);
1235 }
1236
1236#endif
1237 /*
1238 * Map control/status registers.
1239 */
1240 pci_enable_busmaster(dev);
1241
1242 rid = SK_RID;
1243 sc->sk_res = bus_alloc_resource(dev, SK_RES, &rid,
1244 0, ~0, 1, RF_ACTIVE);

--- 995 unchanged lines hidden ---
1237 /*
1238 * Map control/status registers.
1239 */
1240 pci_enable_busmaster(dev);
1241
1242 rid = SK_RID;
1243 sc->sk_res = bus_alloc_resource(dev, SK_RES, &rid,
1244 0, ~0, 1, RF_ACTIVE);

--- 995 unchanged lines hidden ---