Deleted Added
full compact
if_hatm.c (119280) if_hatm.c (119690)
1/*
2 * Copyright (c) 2001-2003
3 * Fraunhofer Institute for Open Communication Systems (FhG Fokus).
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

28 *
29 * ForeHE driver.
30 *
31 * This file contains the module and driver infrastructure stuff as well
32 * as a couple of utility functions and the entire initialisation.
33 */
34
35#include <sys/cdefs.h>
1/*
2 * Copyright (c) 2001-2003
3 * Fraunhofer Institute for Open Communication Systems (FhG Fokus).
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

28 *
29 * ForeHE driver.
30 *
31 * This file contains the module and driver infrastructure stuff as well
32 * as a couple of utility functions and the entire initialisation.
33 */
34
35#include <sys/cdefs.h>
36__FBSDID("$FreeBSD: head/sys/dev/hatm/if_hatm.c 119280 2003-08-22 06:00:27Z imp $");
36__FBSDID("$FreeBSD: head/sys/dev/hatm/if_hatm.c 119690 2003-09-02 17:30:40Z jhb $");
37
38#include "opt_inet.h"
39#include "opt_natm.h"
40
41#include <sys/types.h>
42#include <sys/param.h>
43#include <sys/systm.h>
44#include <sys/malloc.h>

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

1688 * Map memory
1689 */
1690 v = pci_read_config(dev, PCIR_COMMAND, 2);
1691 if (!(v & PCIM_CMD_MEMEN)) {
1692 device_printf(dev, "failed to enable memory\n");
1693 error = ENXIO;
1694 goto failed;
1695 }
37
38#include "opt_inet.h"
39#include "opt_natm.h"
40
41#include <sys/types.h>
42#include <sys/param.h>
43#include <sys/systm.h>
44#include <sys/malloc.h>

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

1688 * Map memory
1689 */
1690 v = pci_read_config(dev, PCIR_COMMAND, 2);
1691 if (!(v & PCIM_CMD_MEMEN)) {
1692 device_printf(dev, "failed to enable memory\n");
1693 error = ENXIO;
1694 goto failed;
1695 }
1696 sc->memid = PCIR_MAPS;
1696 sc->memid = PCIR_BAR(0);
1697 sc->memres = bus_alloc_resource(dev, SYS_RES_MEMORY, &sc->memid,
1698 0, ~0, 1, RF_ACTIVE);
1699 if (sc->memres == NULL) {
1700 device_printf(dev, "could not map memory\n");
1701 error = ENXIO;
1702 goto failed;
1703 }
1704 sc->memh = rman_get_bushandle(sc->memres);

--- 705 unchanged lines hidden ---
1697 sc->memres = bus_alloc_resource(dev, SYS_RES_MEMORY, &sc->memid,
1698 0, ~0, 1, RF_ACTIVE);
1699 if (sc->memres == NULL) {
1700 device_printf(dev, "could not map memory\n");
1701 error = ENXIO;
1702 goto failed;
1703 }
1704 sc->memh = rman_get_bushandle(sc->memres);

--- 705 unchanged lines hidden ---