if_txp.c (150184) | if_txp.c (150306) |
---|---|
1/* $OpenBSD: if_txp.c,v 1.48 2001/06/27 06:34:50 kjc Exp $ */ 2 3/*- 4 * Copyright (c) 2001 5 * Jason L. Wright <jason@thought.net>, Theo de Raadt, and 6 * Aaron Campbell <aaron@monkey.org>. All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 21 unchanged lines hidden (view full) --- 30 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 31 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 32 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 33 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 34 * THE POSSIBILITY OF SUCH DAMAGE. 35 */ 36 37#include <sys/cdefs.h> | 1/* $OpenBSD: if_txp.c,v 1.48 2001/06/27 06:34:50 kjc Exp $ */ 2 3/*- 4 * Copyright (c) 2001 5 * Jason L. Wright <jason@thought.net>, Theo de Raadt, and 6 * Aaron Campbell <aaron@monkey.org>. All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 21 unchanged lines hidden (view full) --- 30 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 31 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 32 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 33 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 34 * THE POSSIBILITY OF SUCH DAMAGE. 35 */ 36 37#include <sys/cdefs.h> |
38__FBSDID("$FreeBSD: head/sys/dev/txp/if_txp.c 150184 2005-09-15 19:41:03Z ru $"); | 38__FBSDID("$FreeBSD: head/sys/dev/txp/if_txp.c 150306 2005-09-19 03:10:21Z imp $"); |
39 40/* 41 * Driver for 3c990 (Typhoon) Ethernet ASIC 42 */ 43 44#include <sys/cdefs.h> | 39 40/* 41 * Driver for 3c990 (Typhoon) Ethernet ASIC 42 */ 43 44#include <sys/cdefs.h> |
45__FBSDID("$FreeBSD: head/sys/dev/txp/if_txp.c 150184 2005-09-15 19:41:03Z ru $"); | 45__FBSDID("$FreeBSD: head/sys/dev/txp/if_txp.c 150306 2005-09-19 03:10:21Z imp $"); |
46 47#include <sys/param.h> 48#include <sys/systm.h> 49#include <sys/sockio.h> 50#include <sys/mbuf.h> 51#include <sys/malloc.h> 52#include <sys/kernel.h> 53#include <sys/module.h> --- 33 unchanged lines hidden (view full) --- 87#define TXP_USEIOSPACE 88#define __STRICT_ALIGNMENT 89 90#include <dev/txp/if_txpreg.h> 91#include <dev/txp/3c990img.h> 92 93#ifndef lint 94static const char rcsid[] = | 46 47#include <sys/param.h> 48#include <sys/systm.h> 49#include <sys/sockio.h> 50#include <sys/mbuf.h> 51#include <sys/malloc.h> 52#include <sys/kernel.h> 53#include <sys/module.h> --- 33 unchanged lines hidden (view full) --- 87#define TXP_USEIOSPACE 88#define __STRICT_ALIGNMENT 89 90#include <dev/txp/if_txpreg.h> 91#include <dev/txp/3c990img.h> 92 93#ifndef lint 94static const char rcsid[] = |
95 "$FreeBSD: head/sys/dev/txp/if_txp.c 150184 2005-09-15 19:41:03Z ru $"; | 95 "$FreeBSD: head/sys/dev/txp/if_txp.c 150306 2005-09-19 03:10:21Z imp $"; |
96#endif 97 98/* 99 * Various supported device vendors/types and their names. 100 */ 101static struct txp_type txp_devs[] = { 102 { TXP_VENDORID_3COM, TXP_DEVICEID_3CR990_TX_95, 103 "3Com 3cR990-TX-95 Etherlink with 3XP Processor" }, --- 283 unchanged lines hidden (view full) --- 387static void 388txp_release_resources(sc) 389 struct txp_softc *sc; 390{ 391 device_t dev; 392 393 dev = sc->sc_dev; 394 | 96#endif 97 98/* 99 * Various supported device vendors/types and their names. 100 */ 101static struct txp_type txp_devs[] = { 102 { TXP_VENDORID_3COM, TXP_DEVICEID_3CR990_TX_95, 103 "3Com 3cR990-TX-95 Etherlink with 3XP Processor" }, --- 283 unchanged lines hidden (view full) --- 387static void 388txp_release_resources(sc) 389 struct txp_softc *sc; 390{ 391 device_t dev; 392 393 dev = sc->sc_dev; 394 |
395 if (sc->sc_ifp) 396 if_free(sc->sc_ifp); 397 | |
398 if (sc->sc_intrhand != NULL) 399 bus_teardown_intr(dev, sc->sc_irq, sc->sc_intrhand); 400 401 if (sc->sc_irq != NULL) 402 bus_release_resource(dev, SYS_RES_IRQ, 0, sc->sc_irq); 403 404 if (sc->sc_res != NULL) 405 bus_release_resource(dev, TXP_RES, TXP_RID, sc->sc_res); 406 407 if (sc->sc_ldata != NULL) 408 contigfree(sc->sc_ldata, sizeof(struct txp_ldata), M_DEVBUF); 409 | 395 if (sc->sc_intrhand != NULL) 396 bus_teardown_intr(dev, sc->sc_irq, sc->sc_intrhand); 397 398 if (sc->sc_irq != NULL) 399 bus_release_resource(dev, SYS_RES_IRQ, 0, sc->sc_irq); 400 401 if (sc->sc_res != NULL) 402 bus_release_resource(dev, TXP_RES, TXP_RID, sc->sc_res); 403 404 if (sc->sc_ldata != NULL) 405 contigfree(sc->sc_ldata, sizeof(struct txp_ldata), M_DEVBUF); 406 |
407 if (sc->sc_ifp) 408 if_free(sc->sc_ifp); 409 |
|
410 return; 411} 412 413static int 414txp_chip_init(sc) 415 struct txp_softc *sc; 416{ 417 /* disable interrupts */ --- 1462 unchanged lines hidden --- | 410 return; 411} 412 413static int 414txp_chip_init(sc) 415 struct txp_softc *sc; 416{ 417 /* disable interrupts */ --- 1462 unchanged lines hidden --- |